From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Fabrice Chapuis <fabrice636861@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Cc: Marcos Pegoraro <marcos@f10.com.br>
Subject: Re: pg_restore remap schema
Date: Wed, 16 Nov 2022 09:42:28 -0500
Message-ID: <1340308.1668609748@sss.pgh.pa.us> (raw)
In-Reply-To: <CAECtzeVznWO98VQyxN8KH24LOcx8UtxoqtLEoKiaowzDnDJ1MA@mail.gmail.com>
References: <CAA5-nLDRgpU_QAKx+LEJshbxkR=TG17Gvei=7n++XKaeX=jmnw@mail.gmail.com>
<CAECtzeXsfT9UQ_XcmYKGcfXw9OR0OEPH1vwUxdFmvOXAp=jKjA@mail.gmail.com>
<645026.1659982962@sss.pgh.pa.us>
<CAA5-nLC88MhvtrH54tRSqCZ2Qw_9sn3Jco03rQnBByghvO-ysQ@mail.gmail.com>
<CAECtzeVznWO98VQyxN8KH24LOcx8UtxoqtLEoKiaowzDnDJ1MA@mail.gmail.com>
Guillaume Lelarge <guillaume@lelarge.info> writes:
> Le mer. 16 nov. 2022 à 13:08, Fabrice Chapuis <fabrice636861@gmail.com> a
> écrit :
>> I worked on the pg_dump source code to add remap schema functionality to
>> use it internally where I work. This is a first version that allows to
>> remap tables, views and sequences (only to export schema). Is this
>> development likely to interest the PG community and to continue this
>> development further?
> If it doesn't work on functions, that will be a big issue. And to be
> honest, I don't think you can do it reliably on functions, especially with
> dynamic queries in PL/pgsql.
Yeah --- I fear there is no hope of making a feature like this that
works reliably enough that we'd accept it. pg_restore is just not
that smart about what is in the chunks of DDL that it processes,
and trying to make it smart enough is a losing game.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, guillaume@lelarge.info, fabrice636861@gmail.com, marcos@f10.com.br
Subject: Re: pg_restore remap schema
In-Reply-To: <1340308.1668609748@sss.pgh.pa.us>
References: <CAA5-nLDRgpU_QAKx+LEJshbxkR=TG17Gvei=7n++XKaeX=jmnw@mail.gmail.com> <CAECtzeXsfT9UQ_XcmYKGcfXw9OR0OEPH1vwUxdFmvOXAp=jKjA@mail.gmail.com> <645026.1659982962@sss.pgh.pa.us> <CAA5-nLC88MhvtrH54tRSqCZ2Qw_9sn3Jco03rQnBByghvO-ysQ@mail.gmail.com> <CAECtzeVznWO98VQyxN8KH24LOcx8UtxoqtLEoKiaowzDnDJ1MA@mail.gmail.com> <1340308.1668609748@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