@@ -48,22 +48,26 @@ shm_mq_send_compat(shm_mq_handle *mqh, Size nbytes, const void *data,
48
48
#endif
49
49
}
50
50
51
+ #if PG_VERSION_NUM < 170000
52
+ #define INIT_PG_LOAD_SESSION_LIBS 0x0001
53
+ #define INIT_PG_OVERRIDE_ALLOW_CONNS 0x0002
54
+ #endif
55
+
51
56
static inline void
52
57
InitPostgresCompat (const char * in_dbname ,Oid dboid ,
53
58
const char * username ,Oid useroid ,
54
- bool load_session_libraries ,
55
- bool override_allow_connections ,
59
+ bits32 flags ,
56
60
char * out_dbname )
57
61
{
58
62
#if PG_VERSION_NUM >=170000
59
- InitPostgres (in_dbname ,dboid ,username ,useroid , (load_session_libraries ?INIT_PG_LOAD_SESSION_LIBS :0 ) |
60
- (override_allow_connections ?INIT_PG_OVERRIDE_ALLOW_CONNS :0 ),out_dbname );
63
+ InitPostgres (in_dbname ,dboid ,username ,useroid ,flags ,out_dbname );
61
64
#elif PG_VERSION_NUM >=150000
62
- InitPostgres (in_dbname ,dboid ,username ,useroid ,load_session_libraries ,
63
- override_allow_connections ,out_dbname );
65
+ InitPostgres (in_dbname ,dboid ,username ,useroid ,
66
+ flags & INIT_PG_LOAD_SESSION_LIBS ,
67
+ flags & INIT_PG_OVERRIDE_ALLOW_CONNS ,out_dbname );
64
68
#elif PG_VERSION_NUM >=110000
65
69
InitPostgres (in_dbname ,dboid ,username ,useroid ,out_dbname ,
66
- override_allow_connections );
70
+ flags & INIT_PG_OVERRIDE_ALLOW_CONNS );
67
71
#else
68
72
InitPostgres (in_dbname ,dboid ,username ,useroid ,out_dbname );
69
73
#endif