mirror of
https://github.com/vlang/v.git
synced 2025-09-14 23:12:33 +03:00
pg: add compatibility.h, using a PG_VERSION_NUM check in the preprocessor, to just hardcode the missing CONNECTION_ numbers
This commit is contained in:
parent
34f5255bb5
commit
f762d46c84
2 changed files with 26 additions and 4 deletions
16
vlib/pg/compatibility.h
Normal file
16
vlib/pg/compatibility.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
|
||||
#if !defined(PG_VERSION_NUM)
|
||||
#error VERROR_MESSAGE PG_VERSION_NUM is not defined. Please install the development headers for PostgreSQL, they are usually in a package named libpq-dev
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM < 100000
|
||||
#define CONNECTION_CHECK_WRITABLE 9
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM < 100000
|
||||
#define CONNECTION_CONSUME 10
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM < 120000
|
||||
#define CONNECTION_GSS_STARTUP 11
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue