Re: PATCH: Report libpq version and configuration - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: PATCH: Report libpq version and configuration
Date
Msg-id CAGRY4nxyXTrHEDJmaHMUt+3iVwwJ2n3Hc22jhQBGsb2P=-2=JQ@mail.gmail.com
Whole thread Raw
In response to Re: PATCH: Report libpq version and configuration  (Craig Ringer <craig.ringer@enterprisedb.com>)
Responses Re: PATCH: Report libpq version and configuration  (Masahiko Sawada <sawada.mshk@gmail.com>)
List pgsql-hackers
On Tue, Nov 10, 2020 at 2:22 PM Craig Ringer <craig.ringer@enterprisedb.com> wrote:

The main things I'd really like to get in place are a way to get the version as an ELF data symbol, and a simple way to ID the binary.

So the minimal change would be to declare:

const char LIBPQ_VERSION_STR[] = PG_VERSION_STR;
const int LIBPQ_VERSION_NUM = PG_VERSION_NUM;

then change PQgetVersion() to return LIBPQ_VERSION_NUM and add a PQgetVersionStr() that returns LIBPQ_VERSION_STR.

That OK with you?

Proposed minimal patch attached.

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Misuse of TimestampDifference() in the autoprewarm feature of pg_prewarm
Next
From: Dilip Kumar
Date:
Subject: Re: logical streaming of xacts via test_decoding is broken