pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: justin@tonic.ai
Subject: BUG #17753: pg_dump --if-exists bug
Date: Wed, 18 Jan 2023 22:33:15 +0000
Message-ID: <17753-9c8773631747ee1c@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      17753
Logged by:          Justin Zhang
Email address:      justin@tonic.ai
PostgreSQL version: 15.1
Operating system:   MacOS 12.6
Description:        

Running pg_dump with the options "--section=pre-data --no-owner
--no-privileges --no-subscriptions --no-publications --clean --if-exists
--file=/Users/ju5tinz/Dev/pg_pass_test/pre_data.sql" prints the warning: 
pg_dump: warning: could not find where to insert IF EXISTS in statement "--
*not* dropping schema, since initdb creates it
"

Seems like pg_dump is trying to add the IF EXISTS operator to a comment
because of the --if-exists option. Tested this in v14 and the warning does
not appear. Also, the sql file is generated successfully.



view thread (6+ messages)  latest in thread

Message-ID: <17753-9c8773631747ee1c@postgresql.org>
Permalink:  ../17753-9c8773631747ee1c@postgresql.org/
Also on:    postgresql.org/message-id/17753-9c8773631747ee1c@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, justin@tonic.ai
  Subject: Re: BUG #17753: pg_dump --if-exists bug
  In-Reply-To: <17753-9c8773631747ee1c@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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