Re: pg_restore remap schema - Mailing list pgsql-general

From Marcos Pegoraro
Subject Re: pg_restore remap schema
Date
Msg-id CAB-JLwYsuKC8gMAyHqqnFyBubSV+xrbo7rX1k8VGbAzm+1g66g@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
List 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, ...

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_restore remap schema
Next
From: Saul Perdomo
Date:
Subject: Re: 20220722-pg_dump: error: invalid number of parents 0 for table