Re: BUG #16514: pg_dump v12 puts CREATE SCHEMA public statement into the backup file

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kravtsov(dot)k(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16514: pg_dump v12 puts CREATE SCHEMA public statement into the backup file
Date: 2020-06-26 20:44:58
Message-ID: 29861.1593204298@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> I’m experiencing some weird behaviour of pg_dump: based on this thread
> https://www.postgresql.org/message-id/flat/20849.1541638465%40sss.pgh.pa.us#744c293b37793dea0f6e60676c3f3210
> , starting from v11 pg_dump should not include CREATE SCHEMA public
> statements to the dump. However, if I run pg_dump v12 with --schema public ,
> it still adds that line to the backup file,

Our interpretation of that is that you've deliberately selected the
schema, so it should be dumped.

> which breaks the ability to
> restore from it

That's rather an overstatement no? You can just ignore the "already
exists" error.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2020-06-26 21:27:59 Re: Problem with pgadm4
Previous Message Jose Alcantara 2020-06-26 18:43:22 Problem with pgadm4