pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: samuel.d.darwin@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18383: creation of public schema is not consistent
Date: Thu, 07 Mar 2024 15:11:41 -0500
Message-ID: <569772.1709842301@sss.pgh.pa.us> (raw)
In-Reply-To: <18383-d93f1e992237a8fd@postgresql.org>
References: <18383-d93f1e992237a8fd@postgresql.org>

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





view thread (5+ messages)  latest in thread

Message-ID: <569772.1709842301@sss.pgh.pa.us>
Permalink:  ../569772.1709842301@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/569772.1709842301@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, samuel.d.darwin@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18383: creation of public schema is not consistent
  In-Reply-To: <569772.1709842301@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox