On 2021-Jun-18, Tom Lane wrote:

> Alvaro Herrera <alvaro.herr...@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


Reply via email to