Re: BUG #9088: default are not working - Mailing list pgsql-bugs

From Marko Tiikkaja
Subject Re: BUG #9088: default are not working
Date
Msg-id 52F018B5.3070106@joh.to
Whole thread Raw
In response to BUG #9088: default are not working  (plademan@comcast.net)
Responses Re: BUG #9088: default are not working
List pgsql-bugs
On 2/3/14, 11:23 PM, plademan@comcast.net wrote:
> It appears that default values are no longer working in 9.3.1.
>
> insert into default_test
> ( userId, date1, date2, date3 )
> values
> ( null, null, null, null );
>
> select * from default_test;

This wouldn't have worked in previous versions either.  You want:

   INSERT INTO default_test (userid, date1, date2, date) VALUES
(DEFAULT, DEFAULT, DEFAULT, DEFAULT)

or perhaps

   INSERT INTO default_test DEFAULT VALUES;


Regards,
Marko Tiikkaja

pgsql-bugs by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: BUG #9088: default are not working
Next
From: craigmluacs@gmail.com
Date:
Subject: BUG #9087: Foreign data wrapper connection management issues