Re: Remove repeated calls to PQserverVersion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove repeated calls to PQserverVersion
Date
Msg-id 3227329.1626185754@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove repeated calls to PQserverVersion  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Remove repeated calls to PQserverVersion  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Jul 13, 2021 at 07:02:27PM +1000, Peter Smith wrote:
>> I found a few functions making unnecessary repeated calls to
>> PQserverVersion(conn); instead of just calling once and assigning to a
>> local variable.

> Does it really matter?  PQserverVersion() does a simple lookup at the
> internals of PGconn.

Yeah, it'd have to be mighty hot code to be worth caring about that,
and none of these spots look like it could be worth it.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alexander Korotkov
Date:
Subject: Re: unnesting multirange data types
Next
From: Ronan Dunklau
Date:
Subject: Early Sort/Group resjunk column elimination.