Re: Table Inheritance and Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Table Inheritance and Foreign Keys
Дата
Msg-id 8781.1550444335@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Table Inheritance and Foreign Keys  ("Riaan Stander" <rstander@exa.co.za>)
Список pgsql-general
"Riaan Stander" <rstander@exa.co.za> writes:
> I've got a scenario where I'm building a table structure that allows for
> building a tree. In order to properly separate the different column
> requirements I've looked at using table inheritance.
> [ but can't point a foreign key at an inheritance tree ]
> My question is if anybody knows more as to if and when this actually will be
> allowed/solved.

Don't hold your breath :-(.  It's been like that for decades.

We do, as of v11, support foreign keys referencing partitioned tables,
but that relies on the ability to declare a unique constraint across
a partitioned table, which in turn relies on there being a known
partitioning key (which has to be part of the unique column set).

Generic inheritance doesn't have that much semantic knowledge about
how the data is divvied up, so it's not really practical to support
these things in a generic inheritance tree.

Probably we should revise that bit of documentation to point people
at the partitioning features; I doubt anything's ever going to be
done about this for generic inheritance.

            regards, tom lane


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

Предыдущее
От: "Riaan Stander"
Дата:
Сообщение: Table Inheritance and Foreign Keys
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Channel binding not supported using scram-sha-256 passwords