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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist
Дата
Msg-id 5294FC63.2090401@gmx.net
обсуждение исходный текст
Ответ на Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Список pgsql-hackers
On 11/24/13, 2:28 PM, Pavel Stehule wrote:
> Note: DROP TRIGGER ON tablename is PostgreSQL feature - no other
> databases (without PostgreSQL forks) uses this syntax - so we don't need
> thinking what is in (or what will be) in ANSI standard (or what other
> databases does). In this moment syntax of DROP TRIGGER is non standard.
> So if we can adopt design (idea) in SQL anywhere or MySQL, then DROP
> TRIGGER IF EXISTS should be enough. In our implementation there are two
> conditions,  but we should not to check if target table exists (from
> statement purpose).

Right, we might as well consider 'trigger ON tablename' to be the full
name of the trigger and just treat it like a unit.

But then a single IF EXISTS clause is still inconsistent with DROP TABLE
nonexistent.foo, which fails if the schema does not exist.  In other
words, the IF EXISTS clause only applies to the end of an name chain.




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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Incomplete freezing when truncating a relation during vacuum