Unique indices and inheritance

Поиск
Список
Период
Сортировка
От Bruce Guenter
Тема Unique indices and inheritance
Дата
Msg-id 19990326001656.A23953@qcc.sk.ca
обсуждение исходный текст
Список pgsql-general
Greetings.

In the following situation:
    create table foo (id int4);
    create table bar (val int4) inherits(foo);
Is it possible to create a unique index such that no record in either
foo or bar (in other words, in foo*) has a duplicated id?  I tried what
seemed to be most obvious to me by doing:
    create unique index foo_pkey on foo*(id);
but it caused a syntax error.  Creating a unique index on just foo
allows duplicates between the two tables.
--
Bruce Guenter, QCC Communications Corp.  EMail: bruce.guenter@qcc.sk.ca
Phone: (306)249-0220               WWW: http://www.qcc.sk.ca/~bguenter/

В списке pgsql-general по дате отправления:

Предыдущее
От: Rodney McDuff
Дата:
Сообщение: User defined function weirdness
Следующее
От: "Ty Augustine"
Дата:
Сообщение: How do I "Insert" using a type member?