Re: Fixing domain input - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fixing domain input
Date
Msg-id 29754.1121053622@sss.pgh.pa.us
Whole thread Raw
In response to Fixing domain input  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Fixing domain input
List pgsql-hackers
I wrote:
> It occurs to me that a cleaner solution would be to stop giving domain
> types the same typinput routines as their base types.  Instead, give
> them all a specialized routine domain_in (comparable to array_in) that
> first invokes the base type's input function and then applies any
> relevant constraint checks.

I did most of the work of coding this up, only to watch the idea
crash and burn: datatype input routines aren't called at all for
NULL values, so there's no way to enforce a NOT NULL domain constraint
from the input routine.

Currently trying to think of decent alternatives ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: suspicious pointer/integer coersion
Next
From: Ferruccio Zamuner
Date:
Subject: fetch_search_path() and elog.c