Re: DEFAULT of domain ignored in plpgsql (8.4.1) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: DEFAULT of domain ignored in plpgsql (8.4.1)
Date
Msg-id 1258847330.30675.8.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: DEFAULT of domain ignored in plpgsql (8.4.1)  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
On lör, 2009-11-21 at 22:20 +0100, Florian G. Pflug wrote:
> > I'm inclined to leave it alone.  It complicates the mental model, and
> >  frankly attaching defaults to domains was not one of the SQL
> > committee's better ideas anyway.  It's *fundamentally*
> > non-orthogonal.
> 
> I've always though of domains as being a kind of subtype of it's base
> type. In this picture, DEFAULTs for domains correspond to overriding the
> default constructor of the type (thinking C++ now), and seem like a
> natural thing to have. But maybe that's more a C++ programmers than a
> database designers point of view...

There are other things in the SQL standard to do that, like types with
inheritance and types with constructors.  We have already overextended
domains enough beyond what the SQL standards says, mostly because these
other things that are the correct solution are not implemented yet.




pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: Ignoring white space in regression tests really a good idea?
Next
From: Jan Urbański
Date:
Subject: Re: Partitioning option for COPY