Re: unique across two tables

Поиск
Список
Период
Сортировка
От Edoardo Panfili
Тема Re: unique across two tables
Дата
Msg-id 4E038849.6090109@aspix.it
обсуждение исходный текст
Ответ на Re: unique across two tables  ("David Johnston" <polobo@yahoo.com>)
Ответы Re: unique across two tables
Re: unique across two tables
Список 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 по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: to_timestamp() and timestamp without time zone
Следующее
От: hernan gonzalez
Дата:
Сообщение: Re: to_timestamp() and timestamp without time zone