Re: patch: option --if-exists for pg_dump - Mailing list pgsql-hackers

From Jeevan Chalke
Subject Re: patch: option --if-exists for pg_dump
Date
Msg-id CAM2+6=UH76KtU1_xORkBzF3_MUnkPoK2EYeaowk22s6Nbyup+g@mail.gmail.com
Whole thread Raw
In response to Re: patch: option --if-exists for pg_dump  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: patch: option --if-exists for pg_dump  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Hi Pavel,

Now the patch looks good to me. However when I try to restore your own sql file's dump, I get following errors:

pg_restore: [archiver (db)] could not execute query: ERROR:  relation "public.emp" does not exist
    Command was: DROP TRIGGER IF EXISTS emp_insert_trigger ON public.emp;

pg_restore: [archiver (db)] could not execute query: ERROR:  schema "myschema" does not exist
    Command was: DROP FUNCTION IF EXISTS myschema.int_to_date(integer);

Is that expected after your patch ?

Also, I didn't quite understand these lines of comments:

                        /*
                         * Descriptor string (te-desc) should not be same as object
                         * specifier for DROP STATEMENT. The DROP DEFAULT has not
                         * IF EXISTS clause - has not sense.
                         */

Will you please rephrase ?

Thanks
--
Jeevan B Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Performance Improvement by reducing WAL for Update Operation
Next
From: Pavel Stehule
Date:
Subject: Re: patch: option --if-exists for pg_dump