Re: [GENERAL] clone_schema function - Mailing list pgsql-general

From Melvin Davidson
Subject Re: [GENERAL] clone_schema function
Date
Msg-id CANu8FiwzML_D_FL5ztDvPJBb95EgXpHsqYGB4W5=1SsV9PCWAg@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] clone_schema function  ("Michael Librodo <mike.librodo(at)gmail(dot)com>" <mike.librodo@gmail.com>)
List pgsql-general


On Tue, Feb 14, 2017 at 7:46 AM, Michael Librodo <mike.librodo(at)gmail(dot)com> <mike.librodo@gmail.com> wrote:
I had to modify the portion that copies FK constraint:

https://gist.github.com/mlibrodo/6f246c483e650dc716eba752a9d3c79a

Basically, the issue on my end was that the FK constraints on the cloned(destination) schema seem to reference the source_schema



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Michael,
Perhaps you can combine that code with the original by Emanuel '3manuek' and that I modified to be more inclusive
of additional objects. See attached.

--
Melvin Davidson
I reserve the right to fantasize.  Whether or not you
wish to share my fantasy is entirely up to you.

Attachment

pgsql-general by date:

Previous
From: mpomykacz
Date:
Subject: Re: [GENERAL] Auto-Rollback option
Next
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] Auto-Rollback option