Re: Why no CONSTANT for row variables in plpgsql? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why no CONSTANT for row variables in plpgsql?
Date
Msg-id 20038.1445383787@sss.pgh.pa.us
Whole thread Raw
In response to Re: Why no CONSTANT for row variables in plpgsql?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
Jim Nasby <Jim.Nasby@bluetreble.com> writes:
> On 10/19/15 7:12 PM, Tom Lane wrote:
>> IMO, we ought to get rid of the use of that representation for
>> composite-type variables and use the RECORD code paths for them,

> That also means there would only need to be changes to RECORD to allow 
> CONSTANT, default, etc.

> Do you know offhand what the starting point for changing that would be? 
> build_datatype()?

Well, definitely build_datatype would want to select PLPGSQL_TTYPE_REC not
PLPGSQL_TTYPE_ROW when seeing TYPTYPE_COMPOSITE.  I suspect that's just a
small tip of a large iceberg, though.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: Why no CONSTANT for row variables in plpgsql?
Next
From: Masahiko Sawada
Date:
Subject: Re: Freeze avoidance of very large table.