On 1/31/18 08:18, Michael Paquier wrote:
>> This also raises a question how a row type with generated columns should
>> behave.  I think a generation expression is a property of a table, so it
>> does not apply in a row type.  (Just like a default is a property of a
>> table and does not apply in row types.)
> 
> Hm.  Identity columns and default columns are part of rowtypes. STORED
> columns can alsobe part of a row type with little effort, so in order to
> be consistent with the all the existing behaviors, it seems to me that
> virtually-generated columns should be part of it as well.  I have
> compiled in the attached SQL file how things behave with your
> patch.  Only virtually-generated columns show a blank value.
> 
> A empty value is unhelpful for the user, which brings a couple of
> possible approaches:
> 1) Make virtual columns part of a row type, which would make it
> consistent with all the other types.

That would be nice.  I'm going to study this some more to see what can
be done.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Reply via email to