Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS
От
David G. Johnston
Тема
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS
Дата
Msg-id
CAKFQuwZsXtxTFTzcJp7CjyzAUdegn_DC0nsnp=iTib3mY=TL7A@mail.gmail.com
Ответ на
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS (Pavel Stehule)
Список
Дерево обсуждения
Unexpected behavior of DROP VIEW/TABLE IF EXISTS Peter Moser <pitiz29a@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Pavel Stehule <pavel.stehule@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Peter Moser <pitiz29a@gmail.com>
Unexpected behavior of DROP VIEW/TABLE IF EXISTS "David G. Johnston" <david.g.johnston@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Pavel Stehule <pavel.stehule@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS "David G. Johnston" <david.g.johnston@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Pavel Stehule <pavel.stehule@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Tom Lane <tgl@sss.pgh.pa.us>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Peter Moser <pitiz29a@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Isaac Morland <isaac.morland@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Robert Haas <robertmhaas@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Tom Lane <tgl@sss.pgh.pa.us>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Robert Haas <robertmhaas@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Tom Lane <tgl@sss.pgh.pa.us>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Pavel Stehule <pavel.stehule@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS "David G. Johnston" <david.g.johnston@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS Robert Haas <robertmhaas@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS "David G. Johnston" <david.g.johnston@gmail.com>
Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS "David G. Johnston" <david.g.johnston@gmail.com>
On Tuesday, June 26, 2018, Pavel Stehule <pavel.stehule@gmail.com> wrote:
My note is related to @b. I understand to the motivation, but I am not sure if it is good idea. Tables and views shares one namespace.
But the command say "drop table" and so it must only be concerned with that subset of the namespace when searching. The note about the view is helpful, but it shouldn't change whether the command succeeded with a notice or errors.
Often usage of DROP TABLE IF EXISTS is together with CREATE TABLENow if some does bad reference in DROP TABLE command, then this command fails (first). If we do proposed change, then DROP TABLE do nothing, and CREATE TABLE fails.
Yes, this is what should be happening. CREATE does have to care about the whole namespace since it creating a new identifier.
So I am not sure, if proposed change is practical because views and tables shares same namespace and current behave has sense too.
I'm doubtful that there is any meaningful technical/practical challenge involved here. And as you say when doing paired drop/creates one of them is going to fail anyway so it doesn't really matter which one. But if someone wants to convert a table to a view imdompotently (the point if INE) right now they cannot using the features that are documented to do just that.
David J.
В списке pgsql-hackers по дате отправления