Re: pg_restore remap schema - Mailing list pgsql-general

From Stéphane Tachoires
Subject Re: pg_restore remap schema
Date
Msg-id CA+gpmfL4sHQXiGY2ngpA7aamj2L1tY=ifp=RAid-zCS+FXBH0w@mail.gmail.com
Whole thread Raw
In response to Re: pg_restore remap schema  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_restore remap schema  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi
And could it be at pg_dump level ?
It seems more aware of what is doing...

Stephane

Le mer. 16 nov. 2022 à 15:42, Tom Lane <tgl@sss.pgh.pa.us> a écrit :
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




--
"Où se posaient les hirondelles avant l'invention du téléphone ?"
  -- Grégoire Lacroix

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore remap schema
Next
From: Tom Lane
Date:
Subject: Re: pg_restore remap schema