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

From Tom Lane
Subject Re: BUG #18383: creation of public schema is not consistent
Date
Msg-id 569772.1709842301@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18383: creation of public schema is not consistent  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18383: creation of public schema is not consistent
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> When you create a database, the public schema has a description "standard
> public schema", by default.

> If you drop and re-create the public schema, it has an empty description.

> These two activities are pretty similar.  Creating a database. Creating a
> public schema.  But the results are different.

Well, yeah.  The one you created is not the "standard" public schema;
it might happen to have the same name, but claiming it is the same
object seems very confused.  It won't necessarily have the same
ownership or permissions, and it definitely won't have the same
comment unless you add that.

> You might imagine, that's
> not particularly important. It doesn't affect anything.  However, the
> absence of that description "standard public schema" can cause errors during
> a backup and restore procedures.  Why?  Because re-setting the schema
> description during a restoration, requires that you must be the "owner" of
> the schema.

As far as I know, pg_dump deals with this issue for the standard
public schema.  For user-created objects, it's up to you to be sure
that the restoring user has sufficient permissions.  This is not
different for schemas than for any other objects.

I'm not really seeing a bug here, and you haven't provided sufficient
detail about your actual problem to act on it.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Sam Darwin
Date:
Subject: Re: BUG #18383: creation of public schema is not consistent
Next
From: Sam Darwin
Date:
Subject: Re: BUG #18383: creation of public schema is not consistent