Re: PATCH: Report libpq version and configuration

From: Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Report libpq version and configuration
Date: 2020-11-11 04:11:05
Message-ID: CAGRY4nxyXTrHEDJmaHMUt+3iVwwJ2n3Hc22jhQBGsb2P=-2=JQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 10, 2020 at 2:22 PM Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)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 Content-Type Size
v2-0001-Add-PQlibVersionString-to-libpq.patch text/x-patch 6.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-11-11 04:29:51 Re: logical streaming of xacts via test_decoding is broken
Previous Message Tom Lane 2020-11-11 03:59:33 Re: Misuse of TimestampDifference() in the autoprewarm feature of pg_prewarm