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

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@2ndquadrant.com>, Tomas Vondra <tv@fuzzy.cz>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2013-11-11T21:19:17Z
Lists: pgsql-bugs, pgsql-hackers
2013/11/11 Pavel Stehule <pavel.stehule@gmail.com>

>
>
>
> 2013/11/11 Tom Lane <tgl@sss.pgh.pa.us>
>
>> Andres Freund <andres@2ndquadrant.com> writes:
>> > Turns out that's bogus - ALTER TABLE has two levels of NOT EXISTS.
>>
>> > Maybe we should just do the same for DROP TRIGGER?
>>
>> > DROP TRIGGER [ IF EXISTS ] name ON table_name [ IF EXISTS ] [ CASCADE |
>> RESTRICT ]
>>
>
This syntax is not consistent with other IF EXISTS.

should be (IF EXISTS is before name always)

DROP TRIGGER [ IF EXISTS ] name ON [ IF EXISTS ] table_name  [ CASCADE |
RESTRICT ]

What do you think about?

Regards

Pavel



>
>> Works for me.
>>
>
> for me too
>
> tomorrow I'll prepare patch
>
> Regards
>
> Pavel
>
>
>>
>>                         regards, tom lane
>>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>>
>
>