Re: BUG #9088: default are not working

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: plademan(at)comcast(dot)net, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #9088: default are not working
Date: 2014-02-03 22:31:17
Message-ID: 52F018B5.3070106@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2/3/14, 11:23 PM, plademan(at)comcast(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Patrick Lademan 2014-02-03 23:38:42 Re: BUG #9088: default are not working
Previous Message Thomas Kellerer 2014-02-03 22:30:32 Re: BUG #9088: default are not working