From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: [BUGS] BUG #7873: pg_restore --clean tries to drop tables that don't exist |
Date: | 2013-11-12 16:00:24 |
Message-ID: | CAFj8pRBQOC4LZmYenGtpZAS=Vt+YTbc8s1UQXTEtcNmVegOv5g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hello
here is patch with fault tolerant drop trigger and drop rule support
drop trigger [if exists] trgname on [if exists] tablename;
drop rule [if exists] trgname on [if exists] tablename;
Regards
Pavel
2013/11/11 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
>
>
>
> 2013/11/11 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>
>> Andres Freund <andres(at)2ndquadrant(dot)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 ]
>>
>> Works for me.
>>
>
> for me too
>
> tomorrow I'll prepare patch
>
> Regards
>
> Pavel
>
>
>>
>> regards, tom lane
>>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-hackers
>>
>
>
Attachment | Content-Type | Size |
---|---|---|
drop-trigger.patch | text/x-patch | 23.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-11-12 19:40:10 | Re: BUG #8448: looping through query results exits at 10th step under some conditions |
Previous Message | Thomas Krause | 2013-11-12 15:24:37 | Wrong estimation of unique values of a table when using partitions [PostgreSQL 9.3.1] |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2013-11-12 16:01:43 | Re: Patch for fail-back without fresh backup |
Previous Message | J Smith | 2013-11-12 15:56:55 | Errors on missing pg_subtrans/ files with 9.3 |