Re: BUG #18383: creation of public schema is not consistent

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: samuel(dot)d(dot)darwin(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18383: creation of public schema is not consistent
Date: 2024-03-07 20:11:41
Message-ID: 569772.1709842301@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:
> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sam Darwin 2024-03-08 01:48:28 Re: BUG #18383: creation of public schema is not consistent
Previous Message Sam Darwin 2024-03-07 19:47:14 Re: BUG #18383: creation of public schema is not consistent