Robert Haas <robertmh...@gmail.com> writes:
> On Mon, Mar 11, 2013 at 3:06 PM, Tom Lane <t...@sss.pgh.pa.us> wrote:
>> Greg Stark <st...@mit.edu> writes:
>>> It feels a bit like unpredictable magic to have "DEFAULT" mean one
>>> thing and omitted columns mean something else.

>> Agreed.  The current code behaves that way, but I think that's
>> indisputably a bug not behavior we want to keep.

> I'm not entirely convinced that's a bug.  Both behaviors seem useful,
> and there has to be some way to specify each one.

I would love it if we had a way to provide remote-default
functionality.  But per SQL spec these should produce the same results:
        INSERT INTO t(f1, f2) VALUES(1, DEFAULT);
        INSERT INTO t(f1) VALUES(1);
If PG fails to work like that, it's not a feature, it's a bug.
Where the default is coming from is not a justification for failing
the POLA like that.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to