PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include "common/connect.h"
#include "common/logging.h"
#include "common/string.h"
#include "fe_utils/connect_utils.h"
#include "fe_utils/query_utils.h"
Go to the source code of this file.
Functions | |
PGconn * | connectDatabase (const ConnParams *cparams, const char *progname, bool echo, bool fail_ok, bool allow_password_reuse) |
PGconn * | connectMaintenanceDatabase (ConnParams *cparams, const char *progname, bool echo) |
void | disconnectDatabase (PGconn *conn) |
PGconn* connectDatabase | ( | const ConnParams * | cparams, |
const char * | progname, | ||
bool | echo, | ||
bool | fail_ok, | ||
bool | allow_password_reuse | ||
) |
Definition at line 32 of file connect_utils.c.
References ALWAYS_SECURE_SEARCH_PATH_SQL, Assert, conn, CONNECTION_BAD, _connParams::dbname, executeQuery(), free, i, lengthof, _connParams::override_dbname, password, pg_fatal, _connParams::pghost, _connParams::pgport, _connParams::pguser, PQclear(), PQconnectdbParams(), PQconnectionNeedsPassword(), PQerrorMessage(), PQfinish(), PQstatus(), progname, _connParams::prompt_password, simple_prompt(), TRI_NO, TRI_YES, and values.
Referenced by connectMaintenanceDatabase().
PGconn* connectMaintenanceDatabase | ( | ConnParams * | cparams, |
const char * | progname, | ||
bool | echo | ||
) |
Definition at line 134 of file connect_utils.c.
References conn, connectDatabase(), _connParams::dbname, and progname.
Referenced by cluster_all_databases(), main(), reindex_all_databases(), and vacuum_all_databases().
void disconnectDatabase | ( | PGconn * | conn | ) |
Definition at line 158 of file connect_utils.c.
References Assert, cancelConn, conn, PQcancelBlocking(), PQcancelCreate(), PQcancelFinish(), PQfinish(), PQTRANS_ACTIVE, and PQtransactionStatus().
Referenced by compile_database_list(), compile_relation_list_one_db(), main(), ParallelSlotsAdoptConn(), ParallelSlotsGetIdle(), and ParallelSlotsTerminate().