Re: clone_schema function

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: "Michael Librodo <mike(dot)librodo(at)gmail(dot)com>" <mike(dot)librodo(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: clone_schema function
Date: 2017-02-14 14:20:32
Message-ID: CANu8FiwzML_D_FL5ztDvPJBb95EgXpHsqYGB4W5=1SsV9PCWAg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 14, 2017 at 7:46 AM, Michael Librodo
<mike.librodo(at)gmail(dot)com> <mike(dot)librodo(at)gmail(dot)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(at)postgresql(dot)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 Content-Type Size
clone_schema.sql text/plain 13.0 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2017-02-14 14:43:41 Re: Auto-Rollback option
Previous Message mpomykacz 2017-02-14 13:12:46 Re: Auto-Rollback option