inherited sequences and primary keys

Поиск
Список
Период
Сортировка
От Brett McCormick
Тема inherited sequences and primary keys
Дата
Msg-id 13604.30092.461415.314753@abraxas.scene.com
обсуждение исходный текст
Список pgsql-hackers
I've got a table that has a primary key with a default of
nextval('seq').  I've got another table which inherits this one, but
it fails to inherit the unique btree index.  It does inherit the
default value.  So, I'm assuming that if I create a unique index for
that field on the child table, it won't keep you from inserting values
that exist in that field in the parent table (and since they both
share the same sequence, that's what I want).

So primary keys do not work in this situation.  Are there plans to
enhance the inheritance?  I have no idea how it works, is it
intelligent?  Seems more klunky than not, but I haven't really looked
at the code.  Should I stop using inheritance altogether, considering
its drawbacks (no idea what child class it is in when selecting from
parent and all children, no shared indices/pkeys) when I don't select
from them all at once?

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

Предыдущее
От: "Vadim B. Mikheev"
Дата:
Сообщение: Re: [HACKERS] Its not my fault. Its SEG's FAULT!
Следующее
От: dg@illustra.com (David Gould)
Дата:
Сообщение: Re: [HACKERS] Everything leaks; How it mm suppose to work?