From: | Fabrice Chapuis <fabrice636861(at)gmail(dot)com> |
---|---|
To: | Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pg_restore remap schema |
Date: | 2022-08-09 06:39:17 |
Message-ID: | CAA5-nLDxFkXbGTyoCmP1d=MhUHoHpce0NGoHyPPWNUm5AoBVZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thank you for your reply.
sed is a solution for making substitutions on plain text. But if we work
with directory mode to use parallelism, I don't see how to proceed to make
a schema remap. Editing the toc file in text mode does not work neither.
Regards,
Fabrice
On Mon, Aug 8, 2022 at 9:27 PM Marcos Pegoraro <marcos(at)f10(dot)com(dot)br> wrote:
> 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, ...
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Taylor Smith | 2022-08-09 14:04:35 | Creating A GIN index on JSONB column (large database) |
Previous Message | Saul Perdomo | 2022-08-08 23:55:23 | Re: 20220722-pg_dump: error: invalid number of parents 0 for table |