Re: Question about NOT NULL and default values. - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Question about NOT NULL and default values.
Date
Msg-id dcc563d10810162036j326a1f00g971d70a6d5ca07a1@mail.gmail.com
Whole thread Raw
In response to Re: Question about NOT NULL and default values.  ("Tim Uckun" <timuckun@gmail.com>)
Responses Re: Question about NOT NULL and default values.  ("Tim Uckun" <timuckun@gmail.com>)
List pgsql-general
On Thu, Oct 16, 2008 at 9:26 PM, Tim Uckun <timuckun@gmail.com> wrote:
>> Not sure how you do this in rails but if you use DEFAULT in the query it
>> works:
>>
>>> create table a(a int default 5);
>> CREATE TABLE
>>
>>> insert into a(a) values (DEFAULT);
>> INSERT 0 1
>
> Unfortunately the SQL is being generated by the ORM.  I really don't
> want to bypass the ORM that would be way too painful.

Are you using the ruby-pg interface?  I was under the impression it
handled this properly.

pgsql-general by date:

Previous
From: Mike Christensen
Date:
Subject: Question about fulltext search and to_tsvector function
Next
From: Tom Lane
Date:
Subject: Re: Question about fulltext search and to_tsvector function