Re: BUG #4374: pg_restore does not restore public schema comment - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4374: pg_restore does not restore public schema comment
Date
Msg-id 18253.1219721260@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #4374: pg_restore does not restore public schema comment  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: BUG #4374: pg_restore does not restore public schema comment
List pgsql-bugs
Craig Ringer <craig@postnewspapers.com.au> writes:
> The issue actually appears to be that the comment on default schema like
> `public' isn't dumped in the first place.

Hmm ... there is a specific exclusion in _printTocEntry to suppress
dumping of either the CREATE SCHEMA command for "public" or its comment.
I don't quite recall the reasoning [ digs... ]  Oh, here it is:
http://archives.postgresql.org/pgsql-committers/2008-01/msg00212.php
You can probably find some related discussion in the archives right
before that, but the commit message is clear enough.

On the whole, since "public" is a quasi-built-in object, it doesn't seem
like a very good idea to depend on being able to alter its properties.
Why not attach your version comment to some other, entirely user-defined
object?  "CREATE SCHEMA version" perhaps ...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Craig Ringer
Date:
Subject: Re: BUG #4374: pg_restore does not restore public schema comment
Next
From: Jeff Davis
Date:
Subject: Re: non-deterministic error related to MIN/MAX optimization