Re: Domains versus polymorphic functions, redux - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Domains versus polymorphic functions, redux
Date
Msg-id 3996.1307127684@sss.pgh.pa.us
Whole thread Raw
In response to Re: Domains versus polymorphic functions, redux  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Another long-range nicety would be something which I have seen in
> some other databases, and which is consistent with the inheritance
> theme, is that you can't compare or assign dissimilar domains -- an
> error is thrown. So if you try to join from the eye color column in
> a person table to the key of a hair color table, you get an error
> unless you explicitly cast one or both of them to the common type.

[ raised eyebrow ... ]  This is all pretty cute, but I think it goes
against both the letter and spirit of the SQL standard.  What you
are describing might be a useful thing to have, but it isn't a SQL
domain.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Domains versus polymorphic functions, redux
Next
From: Pavel Golub
Date:
Subject: Error in PQsetvalue