Wrap use of PQconnectdbParams, add proper error

checking and logging when the connection fails.
This commit is contained in:
Greg Smith
2011-02-23 06:44:10 -05:00
parent 18ef5b3cf3
commit 02daccd6e7
3 changed files with 33 additions and 16 deletions

View File

@@ -21,6 +21,9 @@
#define _REPMGR_DBUTILS_H_
PGconn *establishDBConnection(const char *conninfo, const bool exit_on_error);
PGconn *establishDBConnectionByParams(const char *keywords[],
const char *values[],
const bool exit_on_error);
bool is_standby(PGconn *conn);
char *pg_version(PGconn *conn, char* major_version);
bool guc_setted(PGconn *conn, const char *parameter, const char *op,