pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Boris Kolpackov <boris@codesynthesis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Cc: alvaro.herrera@2ndquadrant.com
Subject: Re: Add version macro to libpq-fe.h
Date: Fri, 18 Jun 2021 15:52:41 +0200
Message-ID: <boris.20210618154240@codesynthesis.com> (raw)
In-Reply-To: <968815.1623936849@sss.pgh.pa.us>
References: <boris.20210617102439@codesynthesis.com>
	<968815.1623936849@sss.pgh.pa.us>

Tom Lane <tgl@sss.pgh.pa.us> writes:

> I think putting a version number as such in there is a truly
> horrid idea.  However, I could get behind adding a boolean flag
> that says specifically whether the pipeline feature exists.
> Then you'd do something like
> 
> #ifdef LIBPQ_HAS_PIPELINING
> 
> rather than embedding knowledge of exactly which release
> added that.

That would be even better, but I agree with what others have
said: we would have to keep adding such feature test macros
going forward.

I think ideally you would want to have both since the version
macro could still be helpful in dealing with "features" that you
did not plan to add (aka bugs).


> Comparing v13 and v14 libpq-fe.h, I see that there is a solution
> available now: "#ifdef PQ_QUERY_PARAM_MAX_LIMIT".

Hm, it must have been added recently since I don't see it in 14beta1.
But thanks for the pointer, if nothing better comes up this will
have to do.





view thread (26+ messages)  latest in thread

Message-ID: <boris.20210618154240@codesynthesis.com>
Permalink:  ../boris.20210618154240@codesynthesis.com/
Also on:    postgresql.org/message-id/boris.20210618154240@codesynthesis.com

 · 

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: boris@codesynthesis.com, tgl@sss.pgh.pa.us, alvaro.herrera@2ndquadrant.com
  Subject: Re: Add version macro to libpq-fe.h
  In-Reply-To: <boris.20210618154240@codesynthesis.com>
  References: <boris.20210617102439@codesynthesis.com> <968815.1623936849@sss.pgh.pa.us> <boris.20210618154240@codesynthesis.com>

* 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