Re: [HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Michael Paquier
On Wed, Mar 12, 2014 at 11:16 PM, Tom Lane wrote: > Julien Tachoires writes: >> A customer has reported us a strange behaviour regarding a rowtype >> column with a domain subfield: > > Rowtypes in general do not support defaults for component fields. And what about adding a TODO item? Support def

Re: [HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Tom Lane
Julien Tachoires writes: > A customer has reported us a strange behaviour regarding a rowtype > column with a domain subfield: Rowtypes in general do not support defaults for component fields. > Is build_column_default() the right place to handle that case ? It's unlikely that this is simple t

[HACKERS] Rowtype column and domain subfield with DEFAULT and NOT NULL constraint

2014-03-12 Thread Julien Tachoires
Hi, A customer has reported us a strange behaviour regarding a rowtype column with a domain subfield: test=# CREATE DOMAIN my_int_not_null_1 AS INTEGER DEFAULT 1 NOT NULL; CREATE DOMAIN test=# CREATE TYPE my_int_rowtype AS ( test(# f1 INTEGER, test(# f2 my_int_not_null_1 test(# ); CRE