Re: unique across two tables - Mailing list pgsql-general

From Edoardo Panfili
Subject Re: unique across two tables
Date
Msg-id 4E038849.6090109@aspix.it
Whole thread Raw
In response to Re: unique across two tables  ("David Johnston" <polobo@yahoo.com>)
Responses Re: unique across two tables  (Tomas Vondra <tv@fuzzy.cz>)
Re: unique across two tables  ("David Johnston" <polobo@yahoo.com>)
List pgsql-general
On 22/06/11 18.30, David Johnston wrote:
> The only (obvious to me) way to really solve the problem - invisibly - is to
> allow for table-less unique indexes that multiple tables can share and that
> have a pointer to the "source" table for any particular entry in the index.
> The other method being discussed effectively uses a physical table to
> implement this behavior.

I Have the same problem: one ID must be unique.
Three tables inherits from the same parent table the id column, the ID
is is defined as:
id bigint DEFAULT nextval('sequence_name')
in the parent table.

Can I assume that a sequence ensures uniqueness?

And... I did some search on Google but can't figure "table-less unique
indexes that multiple tables can share" where can I find further
information regarding this thing?

thank you
Edoardo

pgsql-general by date:

Previous
From: Steve Crawford
Date:
Subject: Re: to_timestamp() and timestamp without time zone
Next
From: hernan gonzalez
Date:
Subject: Re: to_timestamp() and timestamp without time zone