From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: pg_dump et al: Add --if-exists option |
Date: | 2014-03-03 18:04:36 |
Message-ID: | E1WKXEC-0000by-Oc@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
pg_dump et al: Add --if-exists option
This option makes pg_dump, pg_dumpall and pg_restore inject an IF EXISTS
clause to each DROP command they emit. (In pg_dumpall, the clause is
not added to individual objects drops, but rather to the CREATE DATABASE
commands, as well as CREATE ROLE and CREATE TABLESPACE.)
This allows for a better user dump experience when using --clean in case
some objects do not already exist. Per bug #7873 by Dave Rolsky.
Author: Pavel Stěhule
Reviewed-by: Jeevan Chalke, Álvaro Herrera, Josh Kupershmidt
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/9067310cc5dd590e36c2c3219dbf3961d7c9f8cb
Modified Files
--------------
doc/src/sgml/ref/pg_dump.sgml | 14 ++++++-
doc/src/sgml/ref/pg_dumpall.sgml | 11 +++++
doc/src/sgml/ref/pg_restore.sgml | 14 ++++++-
src/bin/pg_dump/pg_backup.h | 1 +
src/bin/pg_dump/pg_backup_archiver.c | 73 +++++++++++++++++++++++++++++++++-
src/bin/pg_dump/pg_dump.c | 7 ++++
src/bin/pg_dump/pg_dumpall.c | 22 ++++++++--
src/bin/pg_dump/pg_restore.c | 11 +++++
8 files changed, 146 insertions(+), 7 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2014-03-03 18:53:04 | pgsql: Rename huge_tlb_pages to huge_pages, and improve docs. |
Previous Message | Robert Haas | 2014-03-03 12:26:56 | Re: pgsql: Introduce replication slots. |