Search Postgresql Archives

Re: Issue with default values and Rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 27, 2014 at 11:17 PM, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> 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...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux