Re: pg_restore remap schema

From: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Fabrice Chapuis <fabrice636861(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_restore remap schema
Date: 2022-08-08 19:26:36
Message-ID: CAB-JLwYsuKC8gMAyHqqnFyBubSV+xrbo7rX1k8VGbAzm+1g66g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> 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 :-)
>

Another 95% solution, if both schemas are on the same server, google for
function clone schema, you´ll find some of them. They create tables,
functions, sequences, views, ...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Zheng Li 2022-08-08 20:22:33 Re: Support logical replication of DDLs
Previous Message Tom Lane 2022-08-08 18:22:42 Re: pg_restore remap schema