Re: Feature Proposal: Constant Values in Columns or Foreign Keys - Mailing list pgsql-general

From Tom Lane
Subject Re: Feature Proposal: Constant Values in Columns or Foreign Keys
Date
Msg-id 18148.1334703715@sss.pgh.pa.us
Whole thread Raw
In response to Re: Feature Proposal: Constant Values in Columns or Foreign Keys  (Nils Gösche <cartan@cartan.de>)
Responses Re: Feature Proposal: Constant Values in Columns or Foreign Keys  (Nils Gösche <cartan@cartan.de>)
List 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 by date:

Previous
From: Nils Gösche
Date:
Subject: Re: Feature Proposal: Constant Values in Columns or Foreign Keys
Next
From: Tom Lane
Date:
Subject: Re: LOCK TABLE is not allowed in a non-volatile function