]> granicus.if.org Git - postgresql/commit
Improve pg_dump/pg_restore --create --if-exists logic.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Nov 2016 19:59:26 +0000 (14:59 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Nov 2016 19:59:26 +0000 (14:59 -0500)
commite69b532be797b3fac87a34be71fc97959f8a02aa
tree6919eab7e98ef51e1f66ff7f331e16684e9c81fc
parent30e3cb307d494990cb38cebff6bfc8b4ce27d7ab
Improve pg_dump/pg_restore --create --if-exists logic.

Teach it not to complain if the dropStmt attached to an archive entry
is actually spelled CREATE OR REPLACE VIEW, since that will happen due to
an upcoming bug fix.  Also, if it doesn't recognize a dropStmt, have it
print a WARNING and then emit the dropStmt unmodified.  That seems like a
much saner behavior than Assert'ing or dumping core due to a null-pointer
dereference, which is what would happen before :-(.

Back-patch to 9.4 where this option was introduced.

Discussion: <19092.1479325184@sss.pgh.pa.us>
src/bin/pg_dump/pg_backup_archiver.c