Re: default value

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: default value
Дата
Msg-id 29435.1055425645@sss.pgh.pa.us
обсуждение исходный текст
Ответ на default value  ("Nathalie Boulos" <nathalieboulos@hotmail.com>)
Список pgsql-admin
"Nathalie Boulos" <nathalieboulos@hotmail.com> writes:
> When i insert a value into a field in the table directly, all the other
> fields take their default values normaly, but the problem is if i insert
> into the rule and not into the table, all the fields who has default values
> do not take them. those fields remains empty.
> So the default value does not work if i insert into a rule ???

A rule has its own defaults --- set them with ALTER TABLE rule SET DEFAULT.

(IIRC this works since about 7.2; it won't work on old Postgresen.)

            regards, tom lane

В списке pgsql-admin по дате отправления:

Предыдущее
От: Stef
Дата:
Сообщение: triggers to foreign keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: triggers to foreign keys