Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79c3012

Browse files
committed
Provide feature-test macros for libpq features added in v17.
As per the policy established in commit6991e77, invent macrosthat can be tested at compile time to detect presence of new libpqfeatures. This should make calling code more readable and lesserror-prone than checking the libpq version would be (especiallysince we don't expose that at compile time; the server version isan unreliable substitute).Discussion:https://postgr.es/m/2042418.1724346970@sss.pgh.pa.us
1 parent6b1f78d commit79c3012

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

‎src/interfaces/libpq/libpq-fe.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,32 @@ extern "C"
3030

3131
/*
3232
* These symbols may be used in compile-time #ifdef tests for the availability
33-
* of newer libpq features.
33+
* ofv14-and-newer libpq features.
3434
*/
35+
/* Features added in PostgreSQL v14: */
3536
/* Indicates presence of PQenterPipelineMode and friends */
3637
#defineLIBPQ_HAS_PIPELINING 1
3738
/* Indicates presence of PQsetTraceFlags; also new PQtrace output format */
3839
#defineLIBPQ_HAS_TRACE_FLAGS 1
40+
41+
/* Features added in PostgreSQL v15: */
3942
/* Indicates that PQsslAttribute(NULL, "library") is useful */
4043
#defineLIBPQ_HAS_SSL_LIBRARY_DETECTION 1
4144

45+
/* Features added in PostgreSQL v17: */
46+
/* Indicates presence of PGcancelConn typedef and associated routines */
47+
#defineLIBPQ_HAS_ASYNC_CANCEL 1
48+
/* Indicates presence of PQchangePassword */
49+
#defineLIBPQ_HAS_CHANGE_PASSWORD 1
50+
/* Indicates presence of PQsetChunkedRowsMode, PGRES_TUPLES_CHUNK */
51+
#defineLIBPQ_HAS_CHUNK_MODE 1
52+
/* Indicates presence of PQclosePrepared, PQclosePortal, etc */
53+
#defineLIBPQ_HAS_CLOSE_PREPARED 1
54+
/* Indicates presence of PQsendPipelineSync */
55+
#defineLIBPQ_HAS_SEND_PIPELINE_SYNC 1
56+
/* Indicates presence of PQsocketPoll, PQgetCurrentTimeUSec */
57+
#defineLIBPQ_HAS_SOCKET_POLL 1
58+
4259
/*
4360
* Option flags for PQcopyResult
4461
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp