Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Дата
Msg-id 20131110232355.GG32665@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2013-11-10 18:16:16 -0500, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2013-11-10 16:28:27 -0500, Tom Lane wrote:
> >> I think this is nonsense.  It's only one step removed from "why do you
> >> need IF EXISTS at all, you should know whether the object is there".
> >> The entire point of this syntax is to not need to do detailed analysis
> >> about whether the object is there.
> 
> > Well, in my opinion the IF EXISTS refers to the object type being
> > dropped. I.e. with DROP TABLE it refers to the table not existing, with
> > DROP TRIGGER it refers to the trigger not existing.
> 
> Then I take it you also think we should undo the changes that made
> "DROP TABLE IF EXISTS foo.bar" not fail if schema foo doesn't exist?
> Because after all, the schema is not the object being dropped.

No, not the same thing imo, although I find that change debatable.

Anyway, if we're going to change DROP TRIGGER at the very least ALTER
TABLE ... DROP CONSTRAINT also needs to be changed, otherwise we'll gain
nothing.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist