pgsql: Avoid harmless warning from pg_dump --if-exists mode. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Avoid harmless warning from pg_dump --if-exists mode.
Date
Msg-id E1pIfL6-004XNK-S8@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Avoid harmless warning from pg_dump --if-exists mode.

If the public schema has a non-default owner (perhaps due to
dropping and recreating it) then use of pg_dump's "--if-exists"
option results in a warning message:

warning: could not find where to insert IF EXISTS in statement "-- *not* dropping schema, since initdb creates it"

This is harmless since the dump output is the same either way,
but nonetheless it's undesirable.  It's the fault of commit
a7a7be1f2, which created situations where a TOC entry's "defn"
or "dropStmt" fields could be just comments.  Although that
commit fixed up the kluges in pg_backup_archiver.c that munge defn
strings, it missed doing so for the one that munges dropStmts.

Per bug# 17753 from Justin Zhang.

Discussion: https://postgr.es/m/17753-9c8773631747ee1c@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/74739d1d3ff6b408895a5908657ffb0648df3d70

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: David Rowley
Date:
Subject: pgsql: Use appendStringInfoSpaces in more places
Next
From: Michael Paquier
Date:
Subject: pgsql: Support the same patterns for pg-user in pg_ident.conf as in pg_