Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogSBt-0007cL-44 for pgsql-general@arkaria.postgresql.org; Thu, 06 Oct 2022 14:49:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ogSBr-0000l5-Lh for pgsql-general@arkaria.postgresql.org; Thu, 06 Oct 2022 14:49:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogSBr-0000kv-B6 for pgsql-general@lists.postgresql.org; Thu, 06 Oct 2022 14:49:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ogSBp-0003MG-3c for pgsql-general@postgresql.org; Thu, 06 Oct 2022 14:49:34 +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 296EnViY2678273; Thu, 6 Oct 2022 10:49:31 -0400 From: Tom Lane To: Ron cc: pgsql-general Subject: Re: pg_restore creates public schema? In-reply-to: <9a423047-24d9-1643-c91e-6c36508b987e@gmail.com> References: <9a423047-24d9-1643-c91e-6c36508b987e@gmail.com> Comments: In-reply-to Ron message dated "Thu, 06 Oct 2022 09:24:39 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2678271.1665067771.1@sss.pgh.pa.us> Date: Thu, 06 Oct 2022 10:49:31 -0400 Message-ID: <2678272.1665067771@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > pg_dump 9.6.24 You realize that that version's been out of support for a year? > Why does pg_restore explicitly create "public" even though public is > automatically created when the database is created? We fixed that in v11 (see 5955d9341). Evidently the fix requires an updated pg_dump more than pg_restore. However, I believe that only happens with -c, so why are you using both -c and -C? regards, tom lane