Re: BUG #18383: creation of public schema is not consistent - Mailing list pgsql-bugs

From Sam Darwin
Subject Re: BUG #18383: creation of public schema is not consistent
Date
Msg-id CANEqPjG2xbmhiWMJ_LHYjtVO0Y=EdxGfPyN0nXkW4PE1L=6vHQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18383: creation of public schema is not consistent  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #18383: creation of public schema is not consistent  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-bugs
 
> I'm not really seeing a bug here, and you haven't provided sufficient
detail about your actual problem to act on it. 

Just tested again. It seems the directionality matters, as follows:  
If the dumpfile says "standard public schema", while the new DB has no schema description.  OK.
If the dumpfile has an empty schema description "", while the new DB is using the default "standard public schema" .  ERROR.

pg_restore: error: could not execute query: ERROR:  must be owner of schema public
Command was: COMMENT ON SCHEMA public IS '';

There is a phenomenon "the curse of knowledge". It means, that error looks perfectly clear to you, but for somebody who didn't know a COMMENT is a DESCRIPTION, and that a schema has a COMMENT (I never adjusted those), and why public is '' , and why a GRANT ALL didn't provide permissions, and why a COMMENT was missing (not at all intentionally) because of a forgotten action many months earlier. One is simply attempting to restore a database.

But now that I have also been cursed by the knowledge I will agree there is no bug. Nothing needs to be done. Well, maybe, consider if terse error messages could be more verbose.


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18383: creation of public schema is not consistent
Next
From: PG Bug reporting form
Date:
Subject: BUG #18384: It's not bug just question about documentation