On Tue, 11 Sep 2001 patrick.jacquot@anpe.fr wrote:
> hello all
> I tried recently (pgsql 7.1.2) to establish the oid of one table as foreign key
> in another.
> To no avail : there was no uniqueness constraint on that column
> Naturally, it seems impossible to add a uniqueness constraint to such a system
> column.
> As far as i know, the oid is by nature unique, excepting for the case of
> wrapping of their sequence.
> Is there any workaround ?
You could add a unique index on oid (which would basically be the unique
constraint), but IIRC it still won't work on the system attribute.