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 1oL7Ot-0005YT-OM for pgsql-general@arkaria.postgresql.org; Mon, 08 Aug 2022 18:22:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oL7Os-00041w-LI for pgsql-general@arkaria.postgresql.org; Mon, 08 Aug 2022 18:22:50 +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 1oL7Os-00040h-A5 for pgsql-general@lists.postgresql.org; Mon, 08 Aug 2022 18:22:50 +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 1oL7Ol-00038b-Vo for pgsql-general@lists.postgresql.org; Mon, 08 Aug 2022 18:22:49 +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 278IMgba645027; Mon, 8 Aug 2022 14:22:42 -0400 From: Tom Lane To: Guillaume Lelarge cc: Fabrice Chapuis , "pgsql-generallists.postgresql.org" Subject: Re: pg_restore remap schema In-reply-to: References: Comments: In-reply-to Guillaume Lelarge message dated "Mon, 08 Aug 2022 20:16:08 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <645025.1659982962.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 08 Aug 2022 14:22:42 -0400 Message-ID: <645026.1659982962@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Guillaume Lelarge writes: > Le lun. 8 août 2022 à 18:28, Fabrice Chapuis a >> Is a development in progress to add this option > Nope, never heard of someone working on this. People have asked for such a thing before, but it'd be quite difficult to do reliably --- particularly inside function bodies, which aren't normally parsed at all during a dump/restore. If you're willing to accept a 95% solution, running the pg_restore output through "sed" would likely work fairly well. I'd personally want to diff the before-and-after scripts before applying though :-) regards, tom lane