@@ -48,22 +48,26 @@ shm_mq_send_compat(shm_mq_handle *mqh, Size nbytes, const void *data,
4848#endif
4949}
5050
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+
5156static inline void
5257InitPostgresCompat (const char * in_dbname , Oid dboid ,
5358 const char * username , Oid useroid ,
54- bool load_session_libraries ,
55- bool override_allow_connections ,
59+ bits32 flags ,
5660 char * out_dbname )
5761{
5862#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 );
6164#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 );
6468#elif PG_VERSION_NUM >= 110000
6569 InitPostgres (in_dbname , dboid , username , useroid , out_dbname ,
66- override_allow_connections );
70+ flags & INIT_PG_OVERRIDE_ALLOW_CONNS );
6771#else
6872 InitPostgres (in_dbname , dboid , username , useroid , out_dbname );
6973#endif
0 commit comments