Christopher Browne cbbrowne
Sun Feb 12 14:35:54 PST 2006
"Marc G. Fournier" <marc at pgsql.com> writes:
> Apparently a UNIQUE index doesn't?
>
> =# \d bit1
>                       Table "public.bit1"
>      Column     |            Type             |   Modifiers 
> ---------------+-----------------------------+---------------
>   instance_id   | integer                     | not null
>   instance_name | character varying(500)      | not null
>   created_on    | timestamp without time zone | default now()
>   code          | text                        |
>   md5sum        | text                        |
>   status        | text                        |
>   activated_on  | text                        |
>   esdnet_uuid   | text                        |
>   license       | text                        |
>   account_uuid  | text                        | 
> Indexes:
>      "bit1_instance_id_key" UNIQUE, btree (instance_id)
>      "bit1lin_idx" btree (lower(instance_name::text))
>
> Gets reported by slony has having no primary key:
>
> ERROR:  Slony-I: table "public"."bit1" has no primary key
>
> So, just to clarify before I do it, all tables that have 'just a UNIQUE 
> key', I'll still have to do 'ALTER TABLE <table> ADD PRIMARY KEY ( field 
> );' to so that Slony likes them?

In the Slonik "set add table" command, you can specify which key to
use if there is no true primary key.
-- 
(reverse (concatenate 'string "ofni.sailifa.ac" "@" "enworbbc"))
<http://dba2.int.libertyrms.com/>
Christopher Browne
(416) 673-4124 (land)



More information about the Slony1-general mailing list