pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Avoid harmless warning from pg_dump --if-exists mode. 2+ messages / 1 participants [nested] [flat]
* pgsql: Avoid harmless warning from pg_dump --if-exists mode. @ 2023-01-20 00:33 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2023-01-20 00:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Avoid harmless warning from pg_dump --if-exists mode. @ 2023-01-20 00:33 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2023-01-20 00:33 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/488e89bf725a3b4a1caf9e3e82ae6e75e914d123 Modified Files -------------- src/bin/pg_dump/pg_backup_archiver.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-01-20 00:33 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-01-20 00:33 pgsql: Avoid harmless warning from pg_dump --if-exists mode. Tom Lane <tgl@sss.pgh.pa.us> 2023-01-20 00:33 pgsql: Avoid harmless warning from pg_dump --if-exists mode. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox