@@ -28,22 +28,26 @@ shm_mq_send_compat(shm_mq_handle *mqh, Size nbytes, const void *data,
2828#endif
2929}
3030
31+ #if PG_VERSION_NUM < 170000
32+ #define INIT_PG_LOAD_SESSION_LIBS 0x0001
33+ #define INIT_PG_OVERRIDE_ALLOW_CONNS 0x0002
34+ #endif
35+
3136static inline void
3237InitPostgresCompat (const char * in_dbname , Oid dboid ,
3338 const char * username , Oid useroid ,
34- bool load_session_libraries ,
35- bool override_allow_connections ,
39+ bits32 flags ,
3640 char * out_dbname )
3741{
3842#if PG_VERSION_NUM >= 170000
39- InitPostgres (in_dbname , dboid , username , useroid , (load_session_libraries ? INIT_PG_LOAD_SESSION_LIBS : 0 ) |
40- (override_allow_connections ? INIT_PG_OVERRIDE_ALLOW_CONNS : 0 ), out_dbname );
43+ InitPostgres (in_dbname , dboid , username , useroid , flags , out_dbname );
4144#elif PG_VERSION_NUM >= 150000
42- InitPostgres (in_dbname , dboid , username , useroid , load_session_libraries ,
43- override_allow_connections , out_dbname );
45+ InitPostgres (in_dbname , dboid , username , useroid ,
46+ flags & INIT_PG_LOAD_SESSION_LIBS ,
47+ flags & INIT_PG_OVERRIDE_ALLOW_CONNS , out_dbname );
4448#else
4549 InitPostgres (in_dbname , dboid , username , useroid , out_dbname ,
46- override_allow_connections );
50+ flags & INIT_PG_OVERRIDE_ALLOW_CONNS );
4751#endif
4852}
4953
0 commit comments