Re: Use get_call_result_type() more widely
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-12-20T08:11:39Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Mon, Dec 19, 2022 at 07:41:27PM +0530, Bharath Rupireddy wrote:
>> 0002 - gets rid of an unnecessary call to BlessTupleDesc()
>> after get_call_result_type().
> Hmm. I am not sure whether this is right, actually..
Hmm ... at least one of the paths through internal_get_result_type
is intentionally blessing the result tupdesc:
if (tupdesc->tdtypeid == RECORDOID &&
tupdesc->tdtypmod < 0)
assign_record_type_typmod(tupdesc);
but it's not clear if they all do, and the comments certainly
aren't promising it.
I'd be in favor of making this a documented API promise,
but it isn't that right now.
regards, tom lane
Commits
-
Switch some system functions to use get_call_result_type()
- 22e3b558052a 16.0 landed