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