Re: [PATCH] Support for Array ELEMENT Foreign Keys - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Support for Array ELEMENT Foreign Keys
Date
Msg-id 9189.1350680898@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Support for Array ELEMENT Foreign Keys  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-hackers
Claudio Freire <klaussfreire@gmail.com> writes:
> What about something more generic?

> CREATE TABLE <tname> ( <cname> <type> [(<expr>)] REFERENCES <t2name>
> [(<t2expr>)] )

> Meaning, if <expr> is missing, it's taken <expr> = <cname>, if not,
> it's the result of that expression the one that references the target
> table.

Doesn't seem terribly sensible as a column constraint: a column
constraint ought to just be on the current column.  If you want
something more generic, the table-constraint syntax would be the
place for it ... but that's not where we have a syntax problem.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Deprecating RULES
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Support for Array ELEMENT Foreign Keys