From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Boris Kolpackov <boris@codesynthesis.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Álvaro Herrera <alvaro.herrera@2ndquadrant.com>
Subject: Re: Add version macro to libpq-fe.h
Date: Thu, 17 Jun 2021 16:13:56 -0400
Message-ID: <1056662.1623960836@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZvSdAMZySxE2bssf3b0wEhdxgOk-rwvzh6Ay3AP1a-GQ@mail.gmail.com>
References: <boris.20210617102439@codesynthesis.com>
<968815.1623936849@sss.pgh.pa.us>
<CA+TgmoY8PVB39k5d=OZ64Sv7ba0s32TXg9Vp6wLnCuO9cHM2QA@mail.gmail.com>
<1026744.1623950177@sss.pgh.pa.us>
<CA+TgmobUeWHRYTbtEAio35pUGn7zRYtjo+2oHLm4WNTvLeJw0A@mail.gmail.com>
<1036264.1623954858@sss.pgh.pa.us>
<CA+TgmoZvSdAMZySxE2bssf3b0wEhdxgOk-rwvzh6Ay3AP1a-GQ@mail.gmail.com>
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jun 17, 2021 at 2:34 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... Just because the
>> version-number approach offloads work from us doesn't make it a good
>> idea, because the work doesn't vanish; it will be dumped in the laps
>> of packagers and end users.
> What work? Including an additional #define in a header file doesn't
> create any work for packagers or end-users that I can see. If
> anything, it seems easier for end-users. If you want a function that
> first appears in v16, just test whether the version number is >= 16.
You're omitting the step of "figure out which version the feature you
want to use appeared in". A few years down the road, that'll get
harder than it might seem to be for a shiny new feature.
As for the packagers, this creates a requirement to include the right
version of the right file in the right sub-package. Admittedly, if
we hack things so that the #define appears directly in libpq-fe.h through
some configure magic, then there's nothing extra for packagers to get
right; but if we put it anywhere else, we're adding ways for them to
get it wrong.
> On the other hand if we promise to add at least one #define to that
> file for each new release,
New libpq API feature, not every new release. I don't really see
that that's much harder than, say, bumping catversion.
> ... then somebody's got to be like, oh, let's
> see, this function was added in v16, now which #define got added in
> that release ... hmm, let me go diff the branches in git ... how is
> that any better?
I repeat that you are evaluating this through the lens of how much
work it is for us as opposed to other people, and I fundamentally
disagree with that being the primary metric.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, boris@codesynthesis.com, alvaro.herrera@2ndquadrant.com
Subject: Re: Add version macro to libpq-fe.h
In-Reply-To: <1056662.1623960836@sss.pgh.pa.us>
References: <boris.20210617102439@codesynthesis.com> <968815.1623936849@sss.pgh.pa.us> <CA+TgmoY8PVB39k5d=OZ64Sv7ba0s32TXg9Vp6wLnCuO9cHM2QA@mail.gmail.com> <1026744.1623950177@sss.pgh.pa.us> <CA+TgmobUeWHRYTbtEAio35pUGn7zRYtjo+2oHLm4WNTvLeJw0A@mail.gmail.com> <1036264.1623954858@sss.pgh.pa.us> <CA+TgmoZvSdAMZySxE2bssf3b0wEhdxgOk-rwvzh6Ay3AP1a-GQ@mail.gmail.com> <1056662.1623960836@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox