pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvaro.herrera@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Boris Kolpackov <boris@codesynthesis.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Add version macro to libpq-fe.h
Date: Fri, 18 Jun 2021 14:03:41 -0400
Message-ID: <202106181803.7ueuxvqv5jah@alvherre.pgsql> (raw)
In-Reply-To: <1231631.1624038273@sss.pgh.pa.us>

On 2021-Jun-18, Tom Lane wrote:

> Alvaro Herrera <alvaro.herrera@2ndquadrant.com> writes:
> > So I'm +1 on adding this "feature macro".
> 
> Concretely, how about the attached?

Seems OK to me.  We can just accumulate any similar ones in the future
nearby.

> (I also got rid of a recently-added
> extra comma.  While the compilers we use might not warn about that,
> it seems unwise to assume that no user's compiler will.)

Oops.

> I guess one unresolved question is whether we want to mention these in
> the SGML docs.  I vote "no", because it'll raise the maintenance cost
> noticeably.  But I can see an argument on the other side.

Well, if we do want docs for these macros, then IMO it'd be okay to have
them in libpq-fe.h itself rather than SGML.  A one-line comment for each
would suffice:

+/*
+ * These symbols may be used in compile-time #ifdef tests for the availability
+ * of newer libpq features.
+ */
+/* Indicates presence of PQenterPipelineMode and friends */
+#define LIBPQ_HAS_PIPELINING 1
+
+/* Indicates presence of PQsetTraceFlags; PQtrace changed output format */
+#define LIBPQ_HAS_TRACE_FLAGS 1

-- 
Álvaro Herrera                            39°49'30"S 73°17'W





view thread (26+ messages)  latest in thread

Message-ID: <202106181803.7ueuxvqv5jah@alvherre.pgsql>
Permalink:  ../202106181803.7ueuxvqv5jah@alvherre.pgsql/
Also on:    postgresql.org/message-id/202106181803.7ueuxvqv5jah@alvherre.pgsql

 · 

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

* 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