|
PostgreSQL Source Code git master
|
#include "libpq-fe.h"

Go to the source code of this file.
Data Structures | |
| struct | _connParams |
Typedefs | |
| typedef struct _connParams | ConnParams |
Enumerations | |
| enum | trivalue { TRI_DEFAULT , TRI_NO , TRI_YES , TRI_DEFAULT , TRI_NO , TRI_YES , TRI_DEFAULT , TRI_NO , TRI_YES , TRI_DEFAULT , TRI_NO , TRI_YES } |
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) |
| typedef struct _connParams ConnParams |
| enum trivalue |
| Enumerator | |
|---|---|
| TRI_DEFAULT | |
| TRI_NO | |
| TRI_YES | |
| TRI_DEFAULT | |
| TRI_NO | |
| TRI_YES | |
| TRI_DEFAULT | |
| TRI_NO | |
| TRI_YES | |
| TRI_DEFAULT | |
| TRI_NO | |
| TRI_YES | |
Definition at line 17 of file connect_utils.h.
| 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, keywords, 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 cluster_one_database(), connect_slot(), connectMaintenanceDatabase(), main(), reindex_one_database(), and vacuum_one_database().
| 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().