pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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 14:34:18 -0400
Message-ID: <1036264.1623954858@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmobUeWHRYTbtEAio35pUGn7zRYtjo+2oHLm4WNTvLeJw0A@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>

Robert Haas <robertmhaas@gmail.com> writes:
> I just went and looked at how exports.txt has evolved over the years.
> Since PostgreSQL 8.1, every release except for 9.4 and 11 added at
> least one new function to libpq. That means in 14 releases we've done
> something that might break someone's compile 12 times. Now maybe you
> want to try to argue that few of those changes are "major," but I
> don't know how that could be a principled argument. Every new function
> is something someone may want to use, and thus a potential compile
> break.

Interesting, but then you have to explain why this is the first time
that somebody has asked for a version number in libpq-fe.h.  Maybe
all those previous additions were indeed minor enough that the
problem didn't come up.  (Another likely possibility, perhaps, is
that people have been misusing the server version for this purpose,
and have been lucky enough to not have that approach fail for them.)

Anyway, I do not see why we can't establish a principle going forward
that new additions to libpq's API should involve at least one macro,
so that they can be checked for with #ifdefs.  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.

BTW, by that principle, we should likely be adding a symbol
associated with the new tracing features, as well as one for
pipelining.  Or is it good enough to tell people they can
check "#ifdef PQTRACE_SUPPRESS_TIMESTAMPS" ?

			regards, tom lane





view thread (26+ messages)  latest in thread

Message-ID: <1036264.1623954858@sss.pgh.pa.us>
Permalink:  ../1036264.1623954858@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1036264.1623954858@sss.pgh.pa.us

 · 

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 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: <1036264.1623954858@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>

* 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