Re: Remove repeated calls to PQserverVersion

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove repeated calls to PQserverVersion
Date: 2021-07-13 14:15:54
Message-ID: 3227329.1626185754@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ronan Dunklau 2021-07-13 14:19:27 Early Sort/Group resjunk column elimination.
Previous Message Alexander Korotkov 2021-07-13 14:13:26 Re: unnesting multirange data types