Re: table dependencies

From: Melvin Davidson <melvin6925(at)gmail(dot)com>
To: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Cc: rod(at)iol(dot)ie, "FarjadFarid(ChkNet)" <farjad(dot)farid(at)checknetworks(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: table dependencies
Date: 2015-09-07 13:37:48
Message-ID: CANu8Fiy2LXV7Fjc+9RjiVqJRemq0b-tuvgzHML1BKVYyDCSnHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

All,
fwiw, I once wrote a plpgsql function to assist in generating slony set
adds.
It grabs all the tables in pg_class and sorts them by foreign key count.
You can pull the main query logic from it and modify to suit your needs.

I've attached for your convenience.

On Mon, Sep 7, 2015 at 6:27 AM, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
wrote:

> On 07/09/15 19:44, Raymond O'Donnell wrote:
>
>> On 06/09/2015 22:59, FarjadFarid(ChkNet) wrote:
>>
>>> No worries.
>>>
>>> I found a way.
>>>
>>> Would you share it, for the archives?
>>
>> Ray.
>>
>>
>> I think I can do it relatively simply, in a reasonable general fashion.
>
> if it is of real interest let me know, and I'll see if I can find time to
> try and implement it.
>
>
> Cheers,
> Gavin
>
>
>
> --
> 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
>

--
*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
slony_generate_set_adds.sql text/plain 3.7 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-09-07 13:42:35 Re: Partitioning and constraint exclusion
Previous Message Giovanni Maruzzelli 2015-09-07 12:56:37 Re: BDR global sequences in two machine failover