Re: DOMAINs and CASTs - Mailing list pgsql-hackers

From Darren Duncan
Subject Re: DOMAINs and CASTs
Date
Msg-id 4DD20372.6020908@darrenduncan.net
Whole thread Raw
In response to Re: DOMAINs and CASTs  (Jaime Casanova <jaime@2ndquadrant.com>)
List pgsql-hackers
Jaime Casanova wrote:
> On Sun, May 15, 2011 at 9:14 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> we should probably try to agree on which
>> of the various options you mention makes most sense.
> 
> well... my original patch only handle the simplest case, namely, try
> to make the cast that the user wants and if none is defined fall to
> the base types...
> 
> anything else will complicate things as you shown... actually, things
> looks very simple until we start creating trees of domains...
> what options look sane to you?

The sanest option I see is don't overload the CAST syntax for subtypes.  Just 
call the foo2bar() function instead.  You still get code with the same level of 
terseness and that is just as easy to read and understand, and there is no 
question of semantics.  Also, that solution works right now. -- Darren Duncan


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: DOMAINs and CASTs
Next
From: Marc-André Laverdière
Date:
Subject: Support for cert auth in JDBC