Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riK5j-00GZzP-KM for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Mar 2024 20:11:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1riK5h-008HOT-Ip for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Mar 2024 20:11:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riK5h-008HOL-Au for pgsql-bugs@lists.postgresql.org; Thu, 07 Mar 2024 20:11:45 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1riK5e-003Mgs-2N for pgsql-bugs@lists.postgresql.org; Thu, 07 Mar 2024 20:11:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 427KBfiU569773; Thu, 7 Mar 2024 15:11:41 -0500 From: Tom Lane To: samuel.d.darwin@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18383: creation of public schema is not consistent In-reply-to: <18383-d93f1e992237a8fd@postgresql.org> References: <18383-d93f1e992237a8fd@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Thu, 07 Mar 2024 17:58:05 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <569771.1709842301.1@sss.pgh.pa.us> Date: Thu, 07 Mar 2024 15:11:41 -0500 Message-ID: <569772.1709842301@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form 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