Re: PKs without indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
> 


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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux