• Alvaro Herrera's avatar
    pg_dump et al: Add --if-exists option · 9067310c
    Alvaro Herrera authored
    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
    9067310c
pg_dumpall.c 57.9 KB