Re: pg_restore remap schema

From: Fabrice Chapuis <fabrice636861(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Subject: Re: pg_restore remap schema
Date: 2022-11-16 12:08:13
Message-ID: CAA5-nLC88MhvtrH54tRSqCZ2Qw_9sn3Jco03rQnBByghvO-ysQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
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?

Regards,
Fabrice

On Mon, Aug 8, 2022 at 8:22 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> > Le lun. 8 août 2022 à 18:28, Fabrice Chapuis <fabrice636861(at)gmail(dot)com> 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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2022-11-16 12:25:41 Re: PostgreSQL server "idle in transaction"
Previous Message shashidhar Reddy 2022-11-16 11:48:41 Re: unrecognized node type: 350