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

2014-01-23 Thread Alvaro Herrera
Pavel Stehule escribió: > I though about it too. But I didn't continue - reasons was named by Dean - > and RemoveObjects are not difficult code - lot of code is mechanical - and > it is not on critical path. I have pushed it after some editorialization. -- Álvaro Herrerahttp://w

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

2014-01-22 Thread Pavel Stehule
Hello 2014/1/22 Dean Rasheed > On 21 January 2014 22:28, Alvaro Herrera wrote: > > I have been mulling over this patch, and I can't seem to come to terms > > with it. I first started making it look nicer here and there, thinking > > it was all mostly okay, but eventually arrived at the idea t

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

2014-01-21 Thread Dean Rasheed
On 21 January 2014 22:28, Alvaro Herrera wrote: > I have been mulling over this patch, and I can't seem to come to terms > with it. I first started making it look nicer here and there, thinking > it was all mostly okay, but eventually arrived at the idea that it seems > wrong to do what this does

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

2014-01-21 Thread Alvaro Herrera
I have been mulling over this patch, and I can't seem to come to terms with it. I first started making it look nicer here and there, thinking it was all mostly okay, but eventually arrived at the idea that it seems wrong to do what this does: basically, get_object_address() tries to obtain an obje

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

2013-12-08 Thread Pavel Stehule
2013/12/8 Dean Rasheed > On 7 December 2013 21:34, Pavel Stehule wrote: > >> Well I was basically proposing that does_not_exist_skipping() be > >> enhanced to report on non-existent types that form part of the object > >> specification. I think this would affect the CAST, FUNCTION, AGGREGATE > >

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

2013-12-05 Thread Dean Rasheed
On 5 December 2013 10:06, Pavel Stehule wrote: >> I think #1175 is close to being ready for commit. Pavel, will you >> produce an updated patch based on our last discussion? I'll set this >> patch to waiting on author. > > > I expected so your version was a final. I have no problem to do other > e

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

2013-12-05 Thread Pavel Stehule
2013/12/5 Dean Rasheed > On 5 December 2013 01:33, Peter Eisentraut wrote: > > Can someone in this thread clarify the commit fest situation? I see two > > entries that appear to be the same: > > > > https://commitfest.postgresql.org/action/patch_view?id=1174 > > https://commitfest.postgresql.or

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

2013-12-05 Thread Pavel Stehule
Hello 2013/12/5 Peter Eisentraut > Can someone in this thread clarify the commit fest situation? I see two > entries that appear to be the same: > > https://commitfest.postgresql.org/action/patch_view?id=1174 > https://commitfest.postgresql.org/action/patch_view?id=1175 > > I think the first o

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

2013-12-04 Thread Dean Rasheed
On 5 December 2013 01:33, Peter Eisentraut wrote: > Can someone in this thread clarify the commit fest situation? I see two > entries that appear to be the same: > > https://commitfest.postgresql.org/action/patch_view?id=1174 > https://commitfest.postgresql.org/action/patch_view?id=1175 > > I thi

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

2013-12-04 Thread Peter Eisentraut
Can someone in this thread clarify the commit fest situation? I see two entries that appear to be the same: https://commitfest.postgresql.org/action/patch_view?id=1174 https://commitfest.postgresql.org/action/patch_view?id=1175 I think the first one is a duplicate or obsolete. -- Sent via p

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

2013-12-04 Thread Pavel Stehule
2013/12/4 Dean Rasheed > On 2 December 2013 04:55, Pavel Stehule wrote: > > Hello > > > > it looks well, thank you > > > > Regards > > > > Pavel > > > > I've been thinking about this some more, and there's another case that > concerns me slightly. We're now making some of the DROP...IF EXISTS >

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

2013-12-04 Thread Dean Rasheed
On 2 December 2013 04:55, Pavel Stehule wrote: > Hello > > it looks well, thank you > > Regards > > Pavel > I've been thinking about this some more, and there's another case that concerns me slightly. We're now making some of the DROP...IF EXISTS commands tolerate non-existent types as well as no

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

2013-12-02 Thread Alvaro Herrera
Dean Rasheed escribió: > I think that memory gets freed at the end of the DROP command, so I > don't think this is a concern. In any case, that RangeVar is only of > order 50 bytes. If we were concerned about memory leakage here, a > bigger concern would be the calling code in does_not_exist_skipp

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

2013-12-02 Thread Dean Rasheed
On 2 December 2013 19:37, Alvaro Herrera wrote: > Dean Rasheed escribió: > >> +/* >> + * If a schema was explicitly specified, test if it exists. If it does not, >> + * report the schema as missing rather than the child object. >> + */ >> +static bool >> +schema_does_not_exist_skipping(List *objn

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

2013-12-02 Thread Alvaro Herrera
Dean Rasheed escribió: > +/* > + * If a schema was explicitly specified, test if it exists. If it does not, > + * report the schema as missing rather than the child object. > + */ > +static bool > +schema_does_not_exist_skipping(List *objname, > +

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

2013-12-01 Thread Pavel Stehule
Hello it looks well, thank you Regards Pavel 2013/12/1 Dean Rasheed > On 1 December 2013 07:32, Pavel Stehule wrote: > > > > > > > > 2013/11/30 Peter Eisentraut > >> > >> trailing whitespace > > > > > > fixed, > > > > Hi, > > I've been looking at this and I think it's mostly in good shape,

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

2013-12-01 Thread Dean Rasheed
On 1 December 2013 07:32, Pavel Stehule wrote: > > > > 2013/11/30 Peter Eisentraut >> >> trailing whitespace > > > fixed, > Hi, I've been looking at this and I think it's mostly in good shape, but I spotted a few minor issues: * There's a typo in the notice text in a couple of places --- "does

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

2013-11-30 Thread Peter Eisentraut
On Fri, 2013-11-29 at 09:06 +0100, Pavel Stehule wrote: > attached patch implement unified behave for DROP IF EXISTS statements > as was discussed src/backend/catalog/namespace.c:1743: indent with spaces. src/backend/commands/dropcmds.c:322: indent with spaces. src/backend/commands/dropcmds.c:32

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

2013-11-27 Thread Pavel Stehule
Hello 2013/11/27 Tom Lane > Dean Rasheed writes: > > Actually the IF EXISTS in DROP TABLE now applies to the schema as > > well. Unfortunately there is currently no consistency across the > > various DROP commands --- some tolerate a non-existent schema, while > > others error out. > > Yeah.

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

2013-11-27 Thread Pavel Stehule
I'll prepare patch 2013/11/27 Tom Lane > Dean Rasheed writes: > > Actually the IF EXISTS in DROP TABLE now applies to the schema as > > well. Unfortunately there is currently no consistency across the > > various DROP commands --- some tolerate a non-existent schema, while > > others error out

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

2013-11-26 Thread Tom Lane
Dean Rasheed writes: > Actually the IF EXISTS in DROP TABLE now applies to the schema as > well. Unfortunately there is currently no consistency across the > various DROP commands --- some tolerate a non-existent schema, while > others error out. Yeah. I think now that we've had this discussion,

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

2013-11-26 Thread Dean Rasheed
On 26 November 2013 19:54, Peter Eisentraut wrote: > 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

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

2013-11-26 Thread Peter Eisentraut
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 o

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

2013-11-24 Thread Pavel Stehule
2013/11/21 Peter Eisentraut > On 11/21/13, 2:35 AM, Pavel Stehule wrote: > > I am feeling, so almost all people prefer > > > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > > > Can we live with it? > > Fine with me. > > I think it helps if you consider IF EXISTS an att

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

2013-11-21 Thread Andres Freund
On 2013-11-21 17:14:17 -0500, Peter Eisentraut wrote: > On 11/21/13, 2:35 AM, Pavel Stehule wrote: > > I am feeling, so almost all people prefer > > > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > > > Can we live with it? > > Fine with me. > > I think it helps if

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

2013-11-21 Thread Peter Eisentraut
On 11/21/13, 2:35 AM, Pavel Stehule wrote: > I am feeling, so almost all people prefer > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > Can we live with it? Fine with me. I think it helps if you consider IF EXISTS an attribute of the command, not an attribute of t

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

2013-11-20 Thread Pavel Stehule
Hello 2013/11/19 Robert Haas > On Tue, Nov 19, 2013 at 3:53 AM, Dean Rasheed > wrote: > > 1). Keep the existing syntax: > > > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > > > but make it tolerate a non-existent table when "IF EXISTS" is specified. > > I don't lov

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

2013-11-19 Thread Robert Haas
On Tue, Nov 19, 2013 at 3:53 AM, Dean Rasheed wrote: > 1). Keep the existing syntax: > > DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]; > > but make it tolerate a non-existent table when "IF EXISTS" is specified. I don't love this option, but I like it better than the other

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

2013-11-19 Thread Pavel Stehule
Hello I am thinking so @2 is not good idea. Using well known idiom "IF EXISTS" once before table name and second after table name can be difficult and messy for users. If you like it, use different idiom or different keyword, please. My person favourite is @1 - fault tolerant version - but I unde

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

2013-11-19 Thread Dean Rasheed
On 12 November 2013 16:00, Pavel Stehule wrote: > 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 > Hi, I have just starte

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

2013-11-12 Thread Pavel Stehule
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 > > > > 2013/11/11 Tom Lane > >> Andres Freund writes: >> >

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

2013-11-11 Thread Pavel Stehule
2013/11/11 Pavel Stehule > > > > 2013/11/11 Tom Lane > >> Andres Freund 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 | >> R

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

2013-11-11 Thread Pavel Stehule
2013/11/11 Tom Lane > Andres Freund 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

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

2013-11-11 Thread Pavel Stehule
I can agree, so DROP TRIGGER doesn't need a IF EXISTS clause when it is executed after DROP TABLE. pg_dump -c produces: DROP TRIGGER jjj ON public.foo; DROP TABLE public.foo; DROP FUNCTION public.f1(); DROP EXTENSION plpgsql; DROP SCHEMA public; Is there some reason why we use explicitly DROP TR

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

2013-11-10 Thread Tom Lane
Andres Freund 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. regards, tom lane --

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

2013-11-10 Thread Andres Freund
On 2013-11-10 18:42:11 -0500, Tom Lane wrote: > Andres Freund writes: > > ... So we'd get approximately one line further unless we fix this for DROP > > DEFAULT and DROP CONSTRAINT as well. Turns out that's bogus - ALTER TABLE has two levels of NOT EXISTS. Maybe we should just do the same for DR

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

2013-11-10 Thread Tom Lane
Andres Freund writes: > ... So we'd get approximately one line further unless we fix this for DROP > DEFAULT and DROP CONSTRAINT as well. True. As far as pg_dump --clean is concerned, it'd undoubtedly be easier if we did what you suggest and just eliminate the emitted DROP commands for table com

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

2013-11-10 Thread Andres Freund
On 2013-11-10 18:26:26 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2013-11-10 18:16:16 -0500, Tom Lane wrote: > >> 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 sche

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

2013-11-10 Thread Tom Lane
Andres Freund writes: > On 2013-11-10 18:16:16 -0500, Tom Lane wrote: >> 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

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

2013-11-10 Thread Andres Freund
On 2013-11-10 18:16:16 -0500, Tom Lane wrote: > Andres Freund 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 thi

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

2013-11-10 Thread Tom Lane
Andres Freund 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

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

2013-11-10 Thread Andres Freund
On 2013-11-10 16:28:27 -0500, Tom Lane wrote: > [ catching up on old email ] > > Andres Freund writes: > > On 2013-10-15 00:23:15 +0200, Tomas Vondra wrote: > >> On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: > >>> This thread seems to have gone cold, but I'm inclined to agree with > >>> Pav

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

2013-11-10 Thread Tom Lane
[ catching up on old email ] Andres Freund writes: > On 2013-10-15 00:23:15 +0200, Tomas Vondra wrote: >> On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: >>> This thread seems to have gone cold, but I'm inclined to agree with >>> Pavel. If the table doesn't exist, neither does the trigger, an

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

2013-10-24 Thread Pavel Stehule
2013/10/24 Robert Haas > On Tue, Oct 22, 2013 at 9:37 PM, Josh Kupershmidt > wrote: > > On Mon, Oct 14, 2013 at 5:38 PM, Josh Kupershmidt > wrote: > >> Also, Pavel, this patch is still listed as 'Needs Review' in the CF > >> app, but I haven't seen a response to the concerns in my last message.

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

2013-10-24 Thread Robert Haas
On Tue, Oct 22, 2013 at 9:37 PM, Josh Kupershmidt wrote: > On Mon, Oct 14, 2013 at 5:38 PM, Josh Kupershmidt wrote: >> Also, Pavel, this patch is still listed as 'Needs Review' in the CF >> app, but I haven't seen a response to the concerns in my last message. > > It looks like this patch has bee

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

2013-10-22 Thread Josh Kupershmidt
On Mon, Oct 14, 2013 at 5:38 PM, Josh Kupershmidt wrote: > Also, Pavel, this patch is still listed as 'Needs Review' in the CF > app, but I haven't seen a response to the concerns in my last message. It looks like this patch has been imported into the 2013-11 CF [1] and marked "Needs Review". I l

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

2013-10-14 Thread Andres Freund
On 2013-10-15 00:23:15 +0200, Tomas Vondra wrote: > Hi, > > On 14.10.2013 23:44, Andres Freund wrote: > > On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: > >> On 09/19/2013 06:12 PM, Pavel Stehule wrote: > >>> 2013/9/16 Satoshi Nagayasu >>> > > >>> > >>> I'm looking a

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

2013-10-14 Thread Tomas Vondra
Hi, On 14.10.2013 23:44, Andres Freund wrote: > On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: >> On 09/19/2013 06:12 PM, Pavel Stehule wrote: >>> 2013/9/16 Satoshi Nagayasu >> > >>> >>> I'm looking at this patch, and I have a question here. >>> >>> Should "DROP TRIG

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

2013-10-14 Thread Andres Freund
On 2013-10-14 17:59:25 -0400, Andrew Dunstan wrote: > > On 10/14/2013 05:44 PM, Andres Freund wrote: > >On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: > >>On 09/19/2013 06:12 PM, Pavel Stehule wrote: > >>> > >>>2013/9/16 Satoshi Nagayasu mailto:sn...@uptime.jp>> > >>> > >>> > >> > >>>I'm

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

2013-10-14 Thread Andrew Dunstan
On 10/14/2013 05:44 PM, Andres Freund wrote: On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: On 09/19/2013 06:12 PM, Pavel Stehule wrote: 2013/9/16 Satoshi Nagayasu mailto:sn...@uptime.jp>> I'm looking at this patch, and I have a question here. Should "DROP TRIGGER IF EXISTS

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

2013-10-14 Thread Andres Freund
On 2013-10-10 12:54:23 -0400, Andrew Dunstan wrote: > > On 09/19/2013 06:12 PM, Pavel Stehule wrote: > > > > > >2013/9/16 Satoshi Nagayasu mailto:sn...@uptime.jp>> > > > > > > > > > >I'm looking at this patch, and I have a question here. > > > >Should "DROP TRIGGER IF EXISTS" ignore erro

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

2013-10-14 Thread Josh Kupershmidt
On Thu, Oct 10, 2013 at 12:54 PM, Andrew Dunstan wrote: > This thread seems to have gone cold, but I'm inclined to agree with Pavel. > If the table doesn't exist, neither does the trigger, and the whole point of > the 'IF EXISTS' variants is to provide the ability to issue DROP commands > that do

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

2013-10-10 Thread Andrew Dunstan
On 09/19/2013 06:12 PM, Pavel Stehule wrote: 2013/9/16 Satoshi Nagayasu mailto:sn...@uptime.jp>> I'm looking at this patch, and I have a question here. Should "DROP TRIGGER IF EXISTS" ignore error for non-existing trigger and non-existing table? Or just only for non-existin

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

2013-09-19 Thread Pavel Stehule
2013/9/16 Satoshi Nagayasu > (2013/07/06 1:16), Pavel Stehule wrote: > >> I am sending a patch that removes strict requirements for DROP IF >> EXISTS statements. This behave is similar to our ALTER IF EXISTS >> behave now. >> >> >> postgres=# DROP CAST IF EXISTS (sss AS public.casttesttype); >> N

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

2013-09-16 Thread Satoshi Nagayasu
(2013/07/06 1:16), Pavel Stehule wrote: I am sending a patch that removes strict requirements for DROP IF EXISTS statements. This behave is similar to our ALTER IF EXISTS behave now. postgres=# DROP CAST IF EXISTS (sss AS public.casttesttype); NOTICE: types "sss" and "public.casttesttype" does