Re: Question about NOT NULL and default values.

From: "Tim Uckun" <timuckun(at)gmail(dot)com>
To: Chris <dmagick(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about NOT NULL and default values.
Date: 2008-10-17 03:26:37
Message-ID: 855e4dcf0810162026j1e3d47b6n5f7b4500e90a615c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2008-10-17 03:31:10 Question about fulltext search and to_tsvector function
Previous Message Scott Marlowe 2008-10-17 03:18:15 Re: Question about NOT NULL and default values.