Re: Domains and subtypes, a brief proposal

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: elein <elein(at)varlena(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Domains and subtypes, a brief proposal
Date: 2006-09-08 18:33:13
Message-ID: 21444.1157740393@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

elein <elein(at)varlena(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-09-08 18:36:21 Re: Fixed length data types issue
Previous Message mark 2006-09-08 18:31:32 Re: Fixed length data types issue