Re: Domains and subtypes, a brief proposal - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Domains and subtypes, a brief proposal
Date
Msg-id 21444.1157740393@sss.pgh.pa.us
Whole thread Raw
In response to Domains and subtypes, a brief proposal  (elein <elein@varlena.com>)
Responses Re: Domains and subtypes, a brief proposal  (elein <elein@varlena.com>)
List pgsql-hackers
elein <elein@varlena.com> writes:
> Domains and subtypes.

>    * Create new child type from values in parent type.
>    * Maintain only checks for constraints
>    * Create implicit casts from child to parent

This seems a bit content-free, because it's not clear how it differs
from what we do now.  We already have implicit child-to-parent casts.

> Constraints on types:

>    * Change the pg_types to hold a NULLABLE constraint text column
>      OR add a type constraint lookup table (pg_domains?)

I understand that you are arguing to allow constraints to be associated
with any type not only domains, but
(a) I don't see why we should want to add that overhead, and
(b) I don't see what that has to do with the problem you actually
need to solve, specifically limiting the application of implicit
domain-to-base-type casts.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Manuel Sugawara
Date:
Subject: Re: Query returning tuples that does not satisfy the WHERE clause
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Fixed length data types issue