Re: PKs without indexes

From: John P Weatherman <jweatherman91(at)alumni(dot)wfu(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Cc: john(dot)weatherman(at)centerstone(dot)org
Subject: Re: PKs without indexes
Date: 2011-04-20 01:59:16
Message-ID: 1303264756.7538.15.camel@darkflame.weatherman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Awesome! Thanks Bob.

On Tue, 2011-04-19 at 12:51 -0700, Bob Lunney wrote:
>
> Slony will use any unique index on a table for replication purposes, so the list of tables should come from:
>
> select relname
> from pg_class c
> join pg_namespace n on c.relnamespace = n.oid
> where nspname = current_schema()
> and relkind = 'r'
> and c.oid not in (
> select indrelid
> from pg_index
> where indisprimary or indisunique
> )
> order by 1;
>
> Bob Lunney
>
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Selva manickaraja 2011-04-20 04:20:27 Re: Orphan Temp Table After PITR
Previous Message Bob Lunney 2011-04-19 19:51:45 Re: PKs without indexes