Re: Question about NOT NULL and default values.

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Question about NOT NULL and default values.
Дата
Msg-id dcc563d10810162036j326a1f00g971d70a6d5ca07a1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Question about NOT NULL and default values.  ("Tim Uckun" <timuckun@gmail.com>)
Ответы Re: Question about NOT NULL and default values.  ("Tim Uckun" <timuckun@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Mike Christensen
Дата:
Сообщение: Question about fulltext search and to_tsvector function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Question about fulltext search and to_tsvector function