Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: pg_restore creates public schema? - Mailing list pgsql-general

From Ron
Subject Re: pg_restore creates public schema?
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: pg_restore creates public schema?  (Tom Lane <[email protected]>)
Responses Re: pg_restore creates public schema?
List pgsql-general
On 10/6/22 09:49, Tom Lane wrote:
> Ron <[email protected]> writes:
>> pg_dump 9.6.24
> You realize that that version's been out of support for a year?

Yes, which is why I'm dumping from an EOL cluster, and restoring to a 
supported version.

>> Why does pg_restore explicitly create "public" even though public is
>> automatically created when the database is created?
> We fixed that in v11 (see 5955d9341).  Evidently the fix requires an
> updated pg_dump more than pg_restore.

Ah.

> However, I believe that only happens with -c, so why are you using both -c and -C?

Because the database might already exist on the target before doing the restore.

-- 
Angular momentum makes the world go 'round.



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore creates public schema?
Next
From: Tom Lane
Date:
Subject: Re: pg_restore creates public schema?