Re: Issue with default values and Rule

Поиск
Список
Период
Сортировка
От Dev Kumkar
Тема Re: Issue with default values and Rule
Дата
Msg-id CALSLE1Nfvp+LuJyZQO8LEvwu2qUwJtm-WXxOZG83DpBJJptqsg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issue with default values and Rule  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Thu, Feb 27, 2014 at 11:17 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
That works because you said NULL is a valid value for the column. If you had specified NOT NULL then you would get an error about violating the NOT NULL constraint. Since you have said NULL is a valid value and you actually specified it in the INSERT the following applies:

http://www.postgresql.org/docs/9.3/interactive/sql-createtable.html

DEFAULT default_expr
 ....

    The default expression will be used in any insert operation that does not specify a value for the column. If there is no default for a column, then the default is null.

Hmm, so looks like there is no generic way out here to handle this in case of rules.

Regards...

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

Предыдущее
От: James Harper
Дата:
Сообщение: multiple results from a function
Следующее
От: Arun P.L
Дата:
Сообщение: pgrestore command