Re: Use get_call_result_type() more widely - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Use get_call_result_type() more widely
Date
Msg-id 20221219190744.6pwq27zz47kguzct@alvherre.pgsql
Whole thread Raw
In response to Re: Use get_call_result_type() more widely  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Use get_call_result_type() more widely  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2022-Dec-19, Robert Haas wrote:

> Here's a modest proposal: let's do nothing about this. There's no
> evidence of a real problem here, so we're going to be trying to judge
> the performance benefits against the code size savings without any
> real data indicating that either one is an issue. I bet we could
> convert all of these to one style or the other and it would make very
> little real world difference, but deciding which ones to change and in
> which direction will take up time and energy that could otherwise be
> spent on more worthwhile projects, and could possibly complicate
> back-patching, too.
> 
> Basically, I think this is nit-picking. Let's just accept that both
> styles have some advantages and leave it up to patch authors to pick
> one that they prefer.

The code savings are substantial actually, so I think bloating things
for cases where performance is not an issue is not good.  Some other
developer is sure to cargo-cult that stuff in the future, and that's not
great.

On the other hand, the measurements have shown that going through the
function is significantly slower.  So I kinda like the judgement call
that Michael and Bharath have made: change to use the function when
performance is not an issue, and keep the verbose coding otherwise.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/



pgsql-hackers by date:

Previous
From: Ted Yu
Date:
Subject: Fixing typo in 002_pg_dump.pl
Next
From: Robert Haas
Date:
Subject: Re: Use get_call_result_type() more widely