Update rows that contain named row types
To update a column that is defined on a named ROW type,
you must specify all fields of the ROW type. For example, the following
statement updates only the street and city fields of
the address column in the employee table, but each field
of the ROW type must contain a value (NULL values are allowed):
UPDATE employee
SET address = ROW('103 California St',
San Francisco', address.state, address.zip)::address_t
WHERE name = 'zawinul, joe';
In this example, the values of the state and zip fields are read from and then immediately reinserted into the row. Only the street and city fields of the address column are updated.
When you update the fields of a column that are defined on a named ROW type, you must use a ROW constructor and cast the row value to the appropriate named ROW type.