@@ -28,22 +28,26 @@ shm_mq_send_compat(shm_mq_handle *mqh, Size nbytes, const void *data,
28
28
#endif
29
29
}
30
30
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
+
31
36
static inline void
32
37
InitPostgresCompat (const char * in_dbname , Oid dboid ,
33
38
const char * username , Oid useroid ,
34
- bool load_session_libraries ,
35
- bool override_allow_connections ,
39
+ bits32 flags ,
36
40
char * out_dbname )
37
41
{
38
42
#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 );
41
44
#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 );
44
48
#else
45
49
InitPostgres (in_dbname , dboid , username , useroid , out_dbname ,
46
- override_allow_connections );
50
+ flags & INIT_PG_OVERRIDE_ALLOW_CONNS );
47
51
#endif
48
52
}
49
53
0 commit comments