Re: DEFAULT of domain ignored in plpgsql (8.4.1)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Berkus <josh(at)agliodbs(dot)com>, Postgresql-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: DEFAULT of domain ignored in plpgsql (8.4.1)
Date: 2009-11-21 23:48:50
Message-ID: 1258847330.30675.8.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-11-21 23:59:18 Re: UTF8 with BOM support in psql
Previous Message David E. Wheeler 2009-11-21 23:07:35 Re: Ignoring white space in regression tests really a good idea?