public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Dominique Devienne <[email protected]>
Cc: [email protected]
Subject: Re: libpq version macro to use or not PQsocketPoll
Date: Tue, 06 Aug 2024 10:31:04 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFCRh-_Fz4HDKt_y+qr-Gztrh+vMiJ4EFxFHDLgC6AePJpWOzQ@mail.gmail.com>
References: <CAFCRh-_Fz4HDKt_y+qr-Gztrh+vMiJ4EFxFHDLgC6AePJpWOzQ@mail.gmail.com>
Dominique Devienne <[email protected]> writes:
> Hi. Now that v17beta2 is part of my dev-env, I'm trying out the new API.
> And I discover there's no version macro for conditional compilation in LIBPQ...
Indeed, that's an oversight, and there's a number of other things
we added to libpq-fe.h between 16 and 17 that probably deserve
their own LIBPQ_HAS symbols.
> I'm not sure what's so wrong with version macro as such.
A couple of things:
* It doesn't help if we forget to update it, so it's not really
better than HAS_ symbols on that score.
* Usage is error-prone (you might test for the wrong cutoff version)
and not very readable.
* We can't retroactively make such a symbol appear in old copies
of libpq-fe.h.
regards, tom lane
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: libpq version macro to use or not PQsocketPoll
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox