Refactor version number detection

Use the reported `server_version_num` integer for version number
detection and comparison. This makes it easier to set an arbitrary
minimum supported version (rather than "9.0 or later") as well
as future-proofing for 10.x and later.
This commit is contained in:
Ian Barwick
2014-12-29 14:54:04 +09:00
parent 4c64d52afb
commit f94626bf7b
5 changed files with 123 additions and 126 deletions

View File

@@ -30,7 +30,7 @@ PGconn *establish_db_connection_by_params(const char *keywords[],
int is_standby(PGconn *conn);
int is_witness(PGconn *conn, char *schema, char *cluster, int node_id);
bool is_pgup(PGconn *conn, int timeout);
char *pg_version(PGconn *conn, char *major_version);
int get_server_version_num(PGconn *conn);
int guc_set(PGconn *conn, const char *parameter, const char *op,
const char *value);
int guc_set_typed(PGconn *conn, const char *parameter, const char *op,