Re: Feature Proposal: Constant Values in Columns or Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Feature Proposal: Constant Values in Columns or Foreign Keys
Дата
Msg-id 18148.1334703715@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Feature Proposal: Constant Values in Columns or Foreign Keys  (Nils Gösche <cartan@cartan.de>)
Ответы Re: Feature Proposal: Constant Values in Columns or Foreign Keys
Список pgsql-general
=?UTF-8?Q?Nils_G=C3=B6sche?= <cartan@cartan.de> writes:
> Bartosz Dmytrak wrote:
>> how about inheritance in postgres?

> I know about Postgres' inheritance feature, but would prefer a more standard relational solution.

[ blink... ] That seems like a pretty silly argument for proposing
something that is *more* nonstandard.

> I was quite surprised to find that this wasn't possible. Is there any good reason why not?

It's contrary to SQL standard is why not.  And it's not just a matter of
being outside the spec, as inheritance is; this is messing with the
details of something that is defined in the standard.  As an example,
I would wonder how such an FK is supposed to be represented in the
spec-defined information schema views.  Other interesting questions
include what would happen to the supposed constant during actions such
as ON DELETE SET NULL or ON UPDATE CASCADE, which normally would result
in a change in the referencing row.

            regards, tom lane

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

Предыдущее
От: Nils Gösche
Дата:
Сообщение: Re: Feature Proposal: Constant Values in Columns or Foreign Keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LOCK TABLE is not allowed in a non-volatile function