Julien Tachoires <julien.tachoi...@dalibo.com> 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 to change.  As an example, should
the default be inserted during a cast to the rowtype?  How about
plpgsql variable initialization?  What are you going to do about
scalar-NULL values of the rowtype (note "forbid them" is likely
to cause all sorts of collateral damage)?

But in any case, none of the examples you showed have anything to
do with build_column_default().  That would only get applied if
the INSERT's targetlist didn't mention col1 at all.

                        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to