PostgreSQL Source Code git master
|
Go to the source code of this file.
Data Structures | |
struct | pgNotify |
struct | _PQprintOpt |
struct | _PQconninfoOption |
struct | PQArgBlock |
struct | pgresAttDesc |
struct | _PGpromptOAuthDevice |
struct | PGoauthBearerRequest |
Macros | |
#define | LIBPQ_HAS_PIPELINING 1 |
#define | LIBPQ_HAS_TRACE_FLAGS 1 |
#define | LIBPQ_HAS_SSL_LIBRARY_DETECTION 1 |
#define | LIBPQ_HAS_ASYNC_CANCEL 1 |
#define | LIBPQ_HAS_CHANGE_PASSWORD 1 |
#define | LIBPQ_HAS_CHUNK_MODE 1 |
#define | LIBPQ_HAS_CLOSE_PREPARED 1 |
#define | LIBPQ_HAS_SEND_PIPELINE_SYNC 1 |
#define | LIBPQ_HAS_SOCKET_POLL 1 |
#define | LIBPQ_HAS_FULL_PROTOCOL_VERSION 1 |
#define | LIBPQ_HAS_PROMPT_OAUTH_DEVICE 1 |
#define | PG_COPYRES_ATTRS 0x01 |
#define | PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */ |
#define | PG_COPYRES_EVENTS 0x04 |
#define | PG_COPYRES_NOTICEHOOKS 0x08 |
#define | PQsetdb(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME) PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL) |
#define | PQTRACE_SUPPRESS_TIMESTAMPS (1<<0) |
#define | PQTRACE_REGRESS_MODE (1<<1) |
#define | PQ_QUERY_PARAM_MAX_LIMIT 65535 |
#define | PQfreeNotify(ptr) PQfreemem(ptr) |
#define | PQnoPasswordSupplied "fe_sendauth: no password supplied\n" |
#define | SOCKTYPE int |
Typedefs | |
typedef struct pg_conn | PGconn |
typedef struct pg_cancel_conn | PGcancelConn |
typedef struct pg_result | PGresult |
typedef struct pg_cancel | PGcancel |
typedef struct pgNotify | PGnotify |
typedef pg_int64 | pg_usec_time_t |
typedef void(* | PQnoticeReceiver) (void *arg, const PGresult *res) |
typedef void(* | PQnoticeProcessor) (void *arg, const char *message) |
typedef char | pqbool |
typedef struct _PQprintOpt | PQprintOpt |
typedef struct _PQconninfoOption | PQconninfoOption |
typedef struct pgresAttDesc | PGresAttDesc |
typedef void(* | pgthreadlock_t) (int acquire) |
typedef struct _PGpromptOAuthDevice | PGpromptOAuthDevice |
typedef struct PGoauthBearerRequest | PGoauthBearerRequest |
typedef int(* | PQauthDataHook_type) (PGauthData type, PGconn *conn, void *data) |
typedef int(* | PQsslKeyPassHook_OpenSSL_type) (char *buf, int size, PGconn *conn) |
Functions | |
PGconn * | PQconnectStart (const char *conninfo) |
PGconn * | PQconnectStartParams (const char *const *keywords, const char *const *values, int expand_dbname) |
PostgresPollingStatusType | PQconnectPoll (PGconn *conn) |
PGconn * | PQconnectdb (const char *conninfo) |
PGconn * | PQconnectdbParams (const char *const *keywords, const char *const *values, int expand_dbname) |
PGconn * | PQsetdbLogin (const char *pghost, const char *pgport, const char *pgoptions, const char *pgtty, const char *dbName, const char *login, const char *pwd) |
void | PQfinish (PGconn *conn) |
PQconninfoOption * | PQconndefaults (void) |
PQconninfoOption * | PQconninfoParse (const char *conninfo, char **errmsg) |
PQconninfoOption * | PQconninfo (PGconn *conn) |
void | PQconninfoFree (PQconninfoOption *connOptions) |
int | PQresetStart (PGconn *conn) |
PostgresPollingStatusType | PQresetPoll (PGconn *conn) |
void | PQreset (PGconn *conn) |
PGcancelConn * | PQcancelCreate (PGconn *conn) |
int | PQcancelStart (PGcancelConn *cancelConn) |
int | PQcancelBlocking (PGcancelConn *cancelConn) |
PostgresPollingStatusType | PQcancelPoll (PGcancelConn *cancelConn) |
ConnStatusType | PQcancelStatus (const PGcancelConn *cancelConn) |
int | PQcancelSocket (const PGcancelConn *cancelConn) |
char * | PQcancelErrorMessage (const PGcancelConn *cancelConn) |
void | PQcancelReset (PGcancelConn *cancelConn) |
void | PQcancelFinish (PGcancelConn *cancelConn) |
PGcancel * | PQgetCancel (PGconn *conn) |
void | PQfreeCancel (PGcancel *cancel) |
int | PQcancel (PGcancel *cancel, char *errbuf, int errbufsize) |
int | PQrequestCancel (PGconn *conn) |
char * | PQdb (const PGconn *conn) |
char * | PQservice (const PGconn *conn) |
char * | PQuser (const PGconn *conn) |
char * | PQpass (const PGconn *conn) |
char * | PQhost (const PGconn *conn) |
char * | PQhostaddr (const PGconn *conn) |
char * | PQport (const PGconn *conn) |
char * | PQtty (const PGconn *conn) |
char * | PQoptions (const PGconn *conn) |
ConnStatusType | PQstatus (const PGconn *conn) |
PGTransactionStatusType | PQtransactionStatus (const PGconn *conn) |
const char * | PQparameterStatus (const PGconn *conn, const char *paramName) |
int | PQprotocolVersion (const PGconn *conn) |
int | PQfullProtocolVersion (const PGconn *conn) |
int | PQserverVersion (const PGconn *conn) |
char * | PQerrorMessage (const PGconn *conn) |
int | PQsocket (const PGconn *conn) |
int | PQbackendPID (const PGconn *conn) |
PGpipelineStatus | PQpipelineStatus (const PGconn *conn) |
int | PQconnectionNeedsPassword (const PGconn *conn) |
int | PQconnectionUsedPassword (const PGconn *conn) |
int | PQconnectionUsedGSSAPI (const PGconn *conn) |
int | PQclientEncoding (const PGconn *conn) |
int | PQsetClientEncoding (PGconn *conn, const char *encoding) |
int | PQsslInUse (PGconn *conn) |
void * | PQsslStruct (PGconn *conn, const char *struct_name) |
const char * | PQsslAttribute (PGconn *conn, const char *attribute_name) |
const char *const * | PQsslAttributeNames (PGconn *conn) |
void * | PQgetssl (PGconn *conn) |
void | PQinitSSL (int do_init) |
void | PQinitOpenSSL (int do_ssl, int do_crypto) |
int | PQgssEncInUse (PGconn *conn) |
void * | PQgetgssctx (PGconn *conn) |
PGVerbosity | PQsetErrorVerbosity (PGconn *conn, PGVerbosity verbosity) |
PGContextVisibility | PQsetErrorContextVisibility (PGconn *conn, PGContextVisibility show_context) |
PQnoticeReceiver | PQsetNoticeReceiver (PGconn *conn, PQnoticeReceiver proc, void *arg) |
PQnoticeProcessor | PQsetNoticeProcessor (PGconn *conn, PQnoticeProcessor proc, void *arg) |
pgthreadlock_t | PQregisterThreadLock (pgthreadlock_t newhandler) |
void | PQtrace (PGconn *conn, FILE *debug_port) |
void | PQuntrace (PGconn *conn) |
void | PQsetTraceFlags (PGconn *conn, int flags) |
PGresult * | PQexec (PGconn *conn, const char *query) |
PGresult * | PQexecParams (PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat) |
PGresult * | PQprepare (PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes) |
PGresult * | PQexecPrepared (PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat) |
int | PQsendQuery (PGconn *conn, const char *query) |
int | PQsendQueryParams (PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat) |
int | PQsendPrepare (PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes) |
int | PQsendQueryPrepared (PGconn *conn, const char *stmtName, int nParams, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat) |
int | PQsetSingleRowMode (PGconn *conn) |
int | PQsetChunkedRowsMode (PGconn *conn, int chunkSize) |
PGresult * | PQgetResult (PGconn *conn) |
int | PQisBusy (PGconn *conn) |
int | PQconsumeInput (PGconn *conn) |
int | PQenterPipelineMode (PGconn *conn) |
int | PQexitPipelineMode (PGconn *conn) |
int | PQpipelineSync (PGconn *conn) |
int | PQsendFlushRequest (PGconn *conn) |
int | PQsendPipelineSync (PGconn *conn) |
PGnotify * | PQnotifies (PGconn *conn) |
int | PQputCopyData (PGconn *conn, const char *buffer, int nbytes) |
int | PQputCopyEnd (PGconn *conn, const char *errormsg) |
int | PQgetCopyData (PGconn *conn, char **buffer, int async) |
int | PQgetline (PGconn *conn, char *buffer, int length) |
int | PQputline (PGconn *conn, const char *string) |
int | PQgetlineAsync (PGconn *conn, char *buffer, int bufsize) |
int | PQputnbytes (PGconn *conn, const char *buffer, int nbytes) |
int | PQendcopy (PGconn *conn) |
int | PQsetnonblocking (PGconn *conn, int arg) |
int | PQisnonblocking (const PGconn *conn) |
int | PQisthreadsafe (void) |
PGPing | PQping (const char *conninfo) |
PGPing | PQpingParams (const char *const *keywords, const char *const *values, int expand_dbname) |
int | PQflush (PGconn *conn) |
PGresult * | PQfn (PGconn *conn, int fnid, int *result_buf, int *result_len, int result_is_int, const PQArgBlock *args, int nargs) |
ExecStatusType | PQresultStatus (const PGresult *res) |
char * | PQresStatus (ExecStatusType status) |
char * | PQresultErrorMessage (const PGresult *res) |
char * | PQresultVerboseErrorMessage (const PGresult *res, PGVerbosity verbosity, PGContextVisibility show_context) |
char * | PQresultErrorField (const PGresult *res, int fieldcode) |
int | PQntuples (const PGresult *res) |
int | PQnfields (const PGresult *res) |
int | PQbinaryTuples (const PGresult *res) |
char * | PQfname (const PGresult *res, int field_num) |
int | PQfnumber (const PGresult *res, const char *field_name) |
Oid | PQftable (const PGresult *res, int field_num) |
int | PQftablecol (const PGresult *res, int field_num) |
int | PQfformat (const PGresult *res, int field_num) |
Oid | PQftype (const PGresult *res, int field_num) |
int | PQfsize (const PGresult *res, int field_num) |
int | PQfmod (const PGresult *res, int field_num) |
char * | PQcmdStatus (PGresult *res) |
char * | PQoidStatus (const PGresult *res) |
Oid | PQoidValue (const PGresult *res) |
char * | PQcmdTuples (PGresult *res) |
char * | PQgetvalue (const PGresult *res, int tup_num, int field_num) |
int | PQgetlength (const PGresult *res, int tup_num, int field_num) |
int | PQgetisnull (const PGresult *res, int tup_num, int field_num) |
int | PQnparams (const PGresult *res) |
Oid | PQparamtype (const PGresult *res, int param_num) |
PGresult * | PQdescribePrepared (PGconn *conn, const char *stmt) |
PGresult * | PQdescribePortal (PGconn *conn, const char *portal) |
int | PQsendDescribePrepared (PGconn *conn, const char *stmt) |
int | PQsendDescribePortal (PGconn *conn, const char *portal) |
PGresult * | PQclosePrepared (PGconn *conn, const char *stmt) |
PGresult * | PQclosePortal (PGconn *conn, const char *portal) |
int | PQsendClosePrepared (PGconn *conn, const char *stmt) |
int | PQsendClosePortal (PGconn *conn, const char *portal) |
void | PQclear (PGresult *res) |
void | PQfreemem (void *ptr) |
PGresult * | PQmakeEmptyPGresult (PGconn *conn, ExecStatusType status) |
PGresult * | PQcopyResult (const PGresult *src, int flags) |
int | PQsetResultAttrs (PGresult *res, int numAttributes, PGresAttDesc *attDescs) |
void * | PQresultAlloc (PGresult *res, size_t nBytes) |
size_t | PQresultMemorySize (const PGresult *res) |
int | PQsetvalue (PGresult *res, int tup_num, int field_num, char *value, int len) |
size_t | PQescapeStringConn (PGconn *conn, char *to, const char *from, size_t length, int *error) |
char * | PQescapeLiteral (PGconn *conn, const char *str, size_t len) |
char * | PQescapeIdentifier (PGconn *conn, const char *str, size_t len) |
unsigned char * | PQescapeByteaConn (PGconn *conn, const unsigned char *from, size_t from_length, size_t *to_length) |
unsigned char * | PQunescapeBytea (const unsigned char *strtext, size_t *retbuflen) |
size_t | PQescapeString (char *to, const char *from, size_t length) |
unsigned char * | PQescapeBytea (const unsigned char *from, size_t from_length, size_t *to_length) |
void | PQprint (FILE *fout, const PGresult *res, const PQprintOpt *po) |
void | PQdisplayTuples (const PGresult *res, FILE *fp, int fillAlign, const char *fieldSep, int printHeader, int quiet) |
void | PQprintTuples (const PGresult *res, FILE *fout, int PrintAttNames, int TerseOutput, int colWidth) |
int | lo_open (PGconn *conn, Oid lobjId, int mode) |
int | lo_close (PGconn *conn, int fd) |
int | lo_read (PGconn *conn, int fd, char *buf, size_t len) |
int | lo_write (PGconn *conn, int fd, const char *buf, size_t len) |
int | lo_lseek (PGconn *conn, int fd, int offset, int whence) |
pg_int64 | lo_lseek64 (PGconn *conn, int fd, pg_int64 offset, int whence) |
Oid | lo_creat (PGconn *conn, int mode) |
Oid | lo_create (PGconn *conn, Oid lobjId) |
int | lo_tell (PGconn *conn, int fd) |
pg_int64 | lo_tell64 (PGconn *conn, int fd) |
int | lo_truncate (PGconn *conn, int fd, size_t len) |
int | lo_truncate64 (PGconn *conn, int fd, pg_int64 len) |
int | lo_unlink (PGconn *conn, Oid lobjId) |
Oid | lo_import (PGconn *conn, const char *filename) |
Oid | lo_import_with_oid (PGconn *conn, const char *filename, Oid lobjId) |
int | lo_export (PGconn *conn, Oid lobjId, const char *filename) |
int | PQlibVersion (void) |
int | PQsocketPoll (int sock, int forRead, int forWrite, pg_usec_time_t end_time) |
pg_usec_time_t | PQgetCurrentTimeUSec (void) |
int | PQmblen (const char *s, int encoding) |
int | PQmblenBounded (const char *s, int encoding) |
int | PQdsplen (const char *s, int encoding) |
int | PQenv2encoding (void) |
char * | PQencryptPassword (const char *passwd, const char *user) |
char * | PQencryptPasswordConn (PGconn *conn, const char *passwd, const char *user, const char *algorithm) |
PGresult * | PQchangePassword (PGconn *conn, const char *user, const char *passwd) |
void | PQsetAuthDataHook (PQauthDataHook_type hook) |
PQauthDataHook_type | PQgetAuthDataHook (void) |
int | PQdefaultAuthDataHook (PGauthData type, PGconn *conn, void *data) |
int | pg_char_to_encoding (const char *name) |
const char * | pg_encoding_to_char (int encoding) |
int | pg_valid_server_encoding_id (int encoding) |
PQsslKeyPassHook_OpenSSL_type | PQgetSSLKeyPassHook_OpenSSL (void) |
void | PQsetSSLKeyPassHook_OpenSSL (PQsslKeyPassHook_OpenSSL_type hook) |
int | PQdefaultSSLKeyPassHook_OpenSSL (char *buf, int size, PGconn *conn) |
#define LIBPQ_HAS_ASYNC_CANCEL 1 |
Definition at line 47 of file libpq-fe.h.
#define LIBPQ_HAS_CHANGE_PASSWORD 1 |
Definition at line 49 of file libpq-fe.h.
#define LIBPQ_HAS_CHUNK_MODE 1 |
Definition at line 51 of file libpq-fe.h.
#define LIBPQ_HAS_CLOSE_PREPARED 1 |
Definition at line 53 of file libpq-fe.h.
#define LIBPQ_HAS_FULL_PROTOCOL_VERSION 1 |
Definition at line 61 of file libpq-fe.h.
#define LIBPQ_HAS_PIPELINING 1 |
Definition at line 37 of file libpq-fe.h.
#define LIBPQ_HAS_PROMPT_OAUTH_DEVICE 1 |
Definition at line 63 of file libpq-fe.h.
#define LIBPQ_HAS_SEND_PIPELINE_SYNC 1 |
Definition at line 55 of file libpq-fe.h.
#define LIBPQ_HAS_SOCKET_POLL 1 |
Definition at line 57 of file libpq-fe.h.
#define LIBPQ_HAS_SSL_LIBRARY_DETECTION 1 |
Definition at line 43 of file libpq-fe.h.
#define LIBPQ_HAS_TRACE_FLAGS 1 |
Definition at line 39 of file libpq-fe.h.
#define PG_COPYRES_ATTRS 0x01 |
Definition at line 68 of file libpq-fe.h.
#define PG_COPYRES_EVENTS 0x04 |
Definition at line 70 of file libpq-fe.h.
#define PG_COPYRES_NOTICEHOOKS 0x08 |
Definition at line 71 of file libpq-fe.h.
#define PG_COPYRES_TUPLES 0x02 /* Implies PG_COPYRES_ATTRS */ |
Definition at line 69 of file libpq-fe.h.
#define PQ_QUERY_PARAM_MAX_LIMIT 65535 |
Definition at line 507 of file libpq-fe.h.
#define PQfreeNotify | ( | ptr | ) | PQfreemem(ptr) |
Definition at line 629 of file libpq-fe.h.
#define PQnoPasswordSupplied "fe_sendauth: no password supplied\n" |
Definition at line 633 of file libpq-fe.h.
#define PQsetdb | ( | M_PGHOST, | |
M_PGPORT, | |||
M_PGOPT, | |||
M_PGTTY, | |||
M_DBNAME | |||
) | PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL) |
Definition at line 338 of file libpq-fe.h.
#define PQTRACE_REGRESS_MODE (1<<1) |
Definition at line 480 of file libpq-fe.h.
#define PQTRACE_SUPPRESS_TIMESTAMPS (1<<0) |
Definition at line 478 of file libpq-fe.h.
#define SOCKTYPE int |
Definition at line 745 of file libpq-fe.h.
typedef pg_int64 pg_usec_time_t |
Definition at line 237 of file libpq-fe.h.
Definition at line 219 of file libpq-fe.h.
typedef struct pg_cancel_conn PGcancelConn |
Definition at line 206 of file libpq-fe.h.
Definition at line 201 of file libpq-fe.h.
typedef struct PGoauthBearerRequest PGoauthBearerRequest |
typedef struct _PGpromptOAuthDevice PGpromptOAuthDevice |
typedef struct pgresAttDesc PGresAttDesc |
Definition at line 213 of file libpq-fe.h.
typedef void(* pgthreadlock_t) (int acquire) |
Definition at line 468 of file libpq-fe.h.
typedef int(* PQauthDataHook_type) (PGauthData type, PGconn *conn, void *data) |
Definition at line 807 of file libpq-fe.h.
typedef char pqbool |
Definition at line 244 of file libpq-fe.h.
typedef struct _PQconninfoOption PQconninfoOption |
typedef void(* PQnoticeProcessor) (void *arg, const char *message) |
Definition at line 241 of file libpq-fe.h.
Definition at line 240 of file libpq-fe.h.
typedef struct _PQprintOpt PQprintOpt |
Definition at line 821 of file libpq-fe.h.
enum ConnStatusType |
Definition at line 81 of file libpq-fe.h.
enum ExecStatusType |
Definition at line 121 of file libpq-fe.h.
enum PGauthData |
Enumerator | |
---|---|
PQAUTHDATA_PROMPT_OAUTH_DEVICE | |
PQAUTHDATA_OAUTH_BEARER_TOKEN |
Definition at line 191 of file libpq-fe.h.
enum PGContextVisibility |
Enumerator | |
---|---|
PQSHOW_CONTEXT_NEVER | |
PQSHOW_CONTEXT_ERRORS | |
PQSHOW_CONTEXT_ALWAYS |
Definition at line 161 of file libpq-fe.h.
enum PGPing |
Enumerator | |
---|---|
PQPING_OK | |
PQPING_REJECT | |
PQPING_NO_RESPONSE | |
PQPING_NO_ATTEMPT |
Definition at line 173 of file libpq-fe.h.
enum PGpipelineStatus |
Enumerator | |
---|---|
PQ_PIPELINE_OFF | |
PQ_PIPELINE_ON | |
PQ_PIPELINE_ABORTED |
Definition at line 184 of file libpq-fe.h.
Enumerator | |
---|---|
PQTRANS_IDLE | |
PQTRANS_ACTIVE | |
PQTRANS_INTRANS | |
PQTRANS_INERROR | |
PQTRANS_UNKNOWN |
Definition at line 144 of file libpq-fe.h.
enum PGVerbosity |
Enumerator | |
---|---|
PQERRORS_TERSE | |
PQERRORS_DEFAULT | |
PQERRORS_VERBOSE | |
PQERRORS_SQLSTATE |
Definition at line 153 of file libpq-fe.h.
Enumerator | |
---|---|
PGRES_POLLING_FAILED | |
PGRES_POLLING_READING | |
PGRES_POLLING_WRITING | |
PGRES_POLLING_OK | |
PGRES_POLLING_ACTIVE |
Definition at line 112 of file libpq-fe.h.
int lo_close | ( | PGconn * | conn, |
int | fd | ||
) |
Definition at line 96 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_close, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by dumpLOs(), EndRestoreLO(), exportFile(), importFile(), lo_export(), lo_import_internal(), my_truncate(), overwrite(), and pickout().
Definition at line 438 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_creat, PQArgBlock::integer, InvalidOid, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, mode, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by importFile(), and lo_import_internal().
Definition at line 474 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_create, PQArgBlock::integer, InvalidOid, PQArgBlock::isint, PQArgBlock::len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by lo_import_internal(), and StartRestoreLO().
Definition at line 748 of file fe-lobj.c.
References buf, close, conn, fd(), filename, INV_READ, libpq_append_conn_error(), LO_BUFSIZE, lo_close(), lo_open(), lo_read(), PG_BINARY, PG_STRERROR_R_BUFLEN, pqClearConnErrorState, strerror_r, and write.
Referenced by do_lo_export(), and main().
Definition at line 626 of file fe-lobj.c.
References conn, filename, InvalidOid, and lo_import_internal().
Referenced by do_lo_import(), and main().
Definition at line 641 of file fe-lobj.c.
References conn, filename, and lo_import_internal().
int lo_lseek | ( | PGconn * | conn, |
int | fd, | ||
int | offset, | ||
int | whence | ||
) |
Definition at line 344 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_lseek, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by overwrite(), and pickout().
Definition at line 385 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_lseek64, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, libpq_append_conn_error(), lo_hton64(), lo_initialize(), lo_ntoh64(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), PQArgBlock::ptr, and PQArgBlock::u.
Referenced by overwrite(), and pickout().
Definition at line 57 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_open, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, mode, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by dumpLOs(), exportFile(), importFile(), lo_export(), lo_import_internal(), my_truncate(), overwrite(), pickout(), and StartRestoreLO().
int lo_read | ( | PGconn * | conn, |
int | fd, | ||
char * | buf, | ||
size_t | len | ||
) |
Definition at line 245 of file fe-lobj.c.
References buf, conn, fd(), pgLobjfuncs::fn_lo_read, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by lo_export().
int lo_tell | ( | PGconn * | conn, |
int | fd | ||
) |
Definition at line 515 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_tell, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Definition at line 548 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_tell64, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, libpq_append_conn_error(), lo_initialize(), lo_ntoh64(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by pickout().
int lo_truncate | ( | PGconn * | conn, |
int | fd, | ||
size_t | len | ||
) |
Definition at line 131 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_truncate, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Definition at line 195 of file fe-lobj.c.
References conn, fd(), pgLobjfuncs::fn_lo_truncate64, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_hton64(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), PQArgBlock::ptr, and PQArgBlock::u.
Referenced by my_truncate().
Definition at line 589 of file fe-lobj.c.
References conn, pgLobjfuncs::fn_lo_unlink, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), and PQArgBlock::u.
Referenced by do_lo_unlink(), and vacuumlo().
int lo_write | ( | PGconn * | conn, |
int | fd, | ||
const char * | buf, | ||
size_t | len | ||
) |
Definition at line 295 of file fe-lobj.c.
References buf, conn, fd(), pgLobjfuncs::fn_lo_write, PQArgBlock::integer, PQArgBlock::isint, PQArgBlock::len, len, libpq_append_conn_error(), lo_initialize(), pg_conn::lobjfuncs, PGRES_COMMAND_OK, PQclear(), PQfn(), PQresultStatus(), PQArgBlock::ptr, PQArgBlock::u, and unconstify.
Referenced by lo_import_internal().
int pg_char_to_encoding | ( | const char * | name | ) |
Definition at line 549 of file encnames.c.
References clean_encoding_name(), sort-test::key, lengthof, name, NAMEDATALEN, and pg_encname_tbl.
Referenced by pg_valid_client_encoding(), and pg_valid_server_encoding().
const char * pg_encoding_to_char | ( | int | encoding | ) |
Definition at line 587 of file encnames.c.
References Assert(), encoding, pg_enc2name::encoding, pg_enc2name::name, pg_enc2name_tbl, and PG_VALID_ENCODING.
int pg_valid_server_encoding_id | ( | int | encoding | ) |
int PQbackendPID | ( | const PGconn * | conn | ) |
Definition at line 7589 of file fe-connect.c.
References pg_conn::be_pid, conn, CONNECTION_OK, and pg_conn::status.
Referenced by exec_command_conninfo(), get_prompt(), libpqrcv_get_backend_pid(), main(), postgres_fdw_get_connections_internal(), send_cancellable_query_impl(), and StartLogStreamer().
int PQbinaryTuples | ( | const PGresult * | res | ) |
Definition at line 3497 of file fe-exec.c.
References pg_result::binary.
Referenced by HandleCopyResult().
int PQcancel | ( | PGcancel * | cancel, |
char * | errbuf, | ||
int | errbufsize | ||
) |
Definition at line 463 of file fe-cancel.c.
References SockAddr::addr, pg_cancel::be_key, pg_cancel::be_pid, buf, CANCEL_REQUEST_CODE, closesocket, connect, EINTR, pg_cancel::keepalives, pg_cancel::keepalives_count, pg_cancel::keepalives_idle, pg_cancel::keepalives_interval, optional_setsockopt(), pg_hton32, PGINVALID_SOCKET, pg_cancel::pgtcp_user_timeout, pg_cancel::raddr, recv, SockAddr::salen, send, SOCK_ERRNO, SOCK_ERRNO_SET, socket, strlcpy(), and val.
Referenced by DisconnectDatabase(), handle_sigint(), PQrequestCancel(), ShutdownWorkersHard(), sigTermHandler(), and test_cancel().
int PQcancelBlocking | ( | PGcancelConn * | cancelConn | ) |
Definition at line 171 of file fe-cancel.c.
References cancelConn, PQcancelStart(), and pqConnectDBComplete().
Referenced by disconnectDatabase(), test_cancel(), and try_complete_step().
PGcancelConn * PQcancelCreate | ( | PGconn * | conn | ) |
Definition at line 65 of file fe-cancel.c.
References SockAddr::addr, pg_cancel::be_key, pg_conn::be_key, pg_cancel::be_pid, pg_conn::be_pid, calloc, cancelConn, conn, CONNECTION_ALLOCATED, CONNECTION_BAD, pg_conn::connhost, pg_conn_host::host, pg_conn_host::hostaddr, libpq_append_conn_error(), pg_conn_host::password, PGINVALID_SOCKET, pg_conn_host::port, pqConnectOptions2(), pqCopyPGconn(), pqMakeEmptyPGconn(), pqReleaseConnHosts(), pg_conn::raddr, pg_conn::sock, and pg_conn::whichhost.
Referenced by disconnectDatabase(), libpqsrv_cancel(), test_cancel(), and try_complete_step().
char * PQcancelErrorMessage | ( | const PGcancelConn * | cancelConn | ) |
Definition at line 306 of file fe-cancel.c.
References cancelConn, and PQerrorMessage().
Referenced by libpqsrv_cancel(), test_cancel(), and try_complete_step().
void PQcancelFinish | ( | PGcancelConn * | cancelConn | ) |
Definition at line 334 of file fe-cancel.c.
References cancelConn, and PQfinish().
Referenced by disconnectDatabase(), libpqsrv_cancel(), test_cancel(), and try_complete_step().
PostgresPollingStatusType PQcancelPoll | ( | PGcancelConn * | cancelConn | ) |
Definition at line 207 of file fe-cancel.c.
References cancelConn, conn, CONNECTION_AWAITING_RESPONSE, CONNECTION_BAD, CONNECTION_OK, pg_conn::errorMessage, libpq_append_conn_error(), PGRES_POLLING_FAILED, PGRES_POLLING_OK, PGRES_POLLING_READING, PQconnectPoll(), pqReadData(), resetPQExpBuffer(), and pg_conn::status.
Referenced by libpqsrv_cancel(), pqConnectDBComplete(), and test_cancel().
void PQcancelReset | ( | PGcancelConn * | cancelConn | ) |
Definition at line 318 of file fe-cancel.c.
References cancelConn, CONNECTION_ALLOCATED, and pqClosePGconn().
Referenced by test_cancel().
int PQcancelSocket | ( | const PGcancelConn * | cancelConn | ) |
Definition at line 294 of file fe-cancel.c.
References cancelConn, and PQsocket().
Referenced by libpqsrv_cancel(), and test_cancel().
int PQcancelStart | ( | PGcancelConn * | cancelConn | ) |
Definition at line 185 of file fe-cancel.c.
References cancelConn, CONNECTION_ALLOCATED, CONNECTION_BAD, libpq_append_conn_error(), and pqConnectDBStart().
Referenced by libpqsrv_cancel(), PQcancelBlocking(), and test_cancel().
ConnStatusType PQcancelStatus | ( | const PGcancelConn * | cancelConn | ) |
Definition at line 283 of file fe-cancel.c.
References cancelConn, and PQstatus().
Referenced by test_cancel().
Definition at line 1531 of file fe-auth.c.
References buf, conn, initPQExpBuffer(), PQencryptPasswordConn(), PQescapeIdentifier(), PQescapeLiteral(), PQexec(), PQfreemem(), printfPQExpBuffer(), termPQExpBuffer(), and user.
Referenced by exec_command_password().
void PQclear | ( | PGresult * | res | ) |
Definition at line 721 of file fe-exec.c.
References pg_result::attDescs, pg_result::curBlock, pg_result::errFields, pg_result::events, free, i, PGEvent::name, pg_result::nEvents, pgresult_data::next, OOM_result, pg_result::paramDescs, PGEvent::passThrough, PGEVT_RESULTDESTROY, PGEvent::proc, PGEventResultDestroy::result, PGEvent::resultInitialized, and pg_result::tuples.
Referenced by _check_database_version(), _doSetSessionAuth(), _printTableAccessMethodNoStorage(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), add_tablespace_footer(), addFooterToPublicationDesc(), advanceConnectionState(), append_depends_on_extension(), appendQualifiedRelation(), BaseBackup(), binary_upgrade_set_type_oids_by_type_oid(), buildMatViewRefreshDependencies(), buildShSecLabels(), check_and_drop_existing_subscriptions(), check_and_drop_publications(), check_for_connection_status(), check_for_pg_role_prefix(), check_for_prepared_transactions(), check_is_install_user(), check_loadable_libraries(), check_new_cluster_logical_replication_slots(), check_new_cluster_subscription_configuration(), check_old_cluster_subscription_state(), check_prepare_conn(), check_publisher(), check_subscriber(), ClearOrSaveResult(), close_cursor(), cluster_all_databases(), collectBinaryUpgradeClassOids(), collectComments(), collectRoleNames(), collectSecLabels(), collectSequences(), compile_database_list(), compile_relation_list_one_db(), confirm_query_canceled_impl(), connect_database(), ConnectDatabase(), connectDatabase(), connectToServer(), convertTSFunction(), create_cursor(), create_logical_replication_slot(), create_logical_replication_slots(), create_new_objects(), create_publication(), create_subscription(), CreateReplicationSlot(), createViewAsClause(), dblink_close(), dblink_exec(), dblink_fetch(), dblink_open(), dblink_res_error(), dblink_res_internalerror(), deallocate_one(), deallocate_query(), describeAccessMethods(), describeAggregates(), describeConfigurationParameters(), describeFunctions(), describeOneTableDetails(), describeOneTSConfig(), describeOneTSParser(), describeOperators(), describePublications(), DescribeQuery(), describeRoleGrants(), describeRoles(), describeSubscriptions(), describeTableDetails(), describeTablespaces(), describeTypes(), descriptor_free(), discardAbortedPipelineResults(), discardUntilSync(), do_lo_import(), do_sql_command_end(), drop_existing_subscriptions(), drop_failover_replication_slots(), drop_publication(), drop_replication_slot(), dropDBs(), DropReplicationSlot(), dropRoles(), dropTablespaces(), dumpAgg(), dumpBaseType(), dumpCollation(), dumpCompositeType(), dumpConversion(), dumpDatabase(), dumpDatabaseConfig(), dumpDatabases(), dumpDomain(), dumpEnumType(), dumpForeignServer(), dumpFunc(), dumpOpclass(), dumpOpfamily(), dumpOpr(), dumpRangeType(), dumpRelationStats(), dumpRoleGUCPrivs(), dumpRoleMembership(), dumpRoles(), dumpRule(), dumpSearchPath(), dumpSequence(), dumpSequenceData(), dumpStatisticsExt(), dumpTable(), dumpTableAttach(), dumpTableData_copy(), dumpTableData_insert(), dumpTableSchema(), dumpTablespaces(), dumpTSConfig(), dumpTSDictionary(), dumpUserConfig(), dumpUserMappings(), ecpg_autostart_transaction(), ecpg_check_PQresult(), ecpg_is_type_an_array(), ecpg_process_output(), ECPGdescribe(), ECPGsetcommit(), ECPGtrans(), enable_subscription(), EndDBCopyMode(), exec_command_password(), execute_foreign_modify(), executeCommand(), executeMaintenanceCommand(), executeQueryOrDie(), ExecuteSqlCommand(), ExecuteSqlStatement(), executeStatement(), expand_dbname_patterns(), expand_extension_name_patterns(), expand_foreign_server_name_patterns(), expand_schema_name_patterns(), expand_table_name_patterns(), fail_lo_xact(), fetch_more_data(), finish_lo_xact(), generate_object_name(), get_create_object_cmd(), get_db_infos(), get_language_name(), get_loadable_libraries(), get_next_possible_free_pg_type_oid(), get_parallel_tabidx_list(), get_parallel_tables_list(), get_primary_sysid(), get_remote_estimate(), get_returning_data(), get_subscription_count(), get_synchronized_snapshot(), get_table_relkind(), get_tablespace_paths(), get_template0_info(), getAccessMethods(), getAdditionalACLs(), getAggregates(), getCasts(), getCollations(), GetConnection(), getConstraints(), getConversions(), getCopyStart(), getDefaultACLs(), getDependencies(), getDomainConstraints(), getEventTriggers(), getExtendedStatistics(), getExtensionMembership(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFormattedTypeName(), getFuncs(), getIndexes(), getInherits(), getLOs(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getParamDescriptions(), getPartitioningInfo(), getPolicies(), getProcLangs(), getPublicationNamespaces(), getPublications(), getPublicationTables(), getRowDescriptions(), getRules(), GetSlotInformation(), getSubscriptions(), getSubscriptionTables(), getTableAttrs(), GetTableInfo(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), handleCopyIn(), HandleCopyResult(), HandleEndOfCopyStream(), init_libpq_conn(), initPopulateTable(), libpq_fetch_file(), libpq_traverse_files(), libpqrcv_alter_slot(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_identify_system(), libpqrcv_PQexec(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_startstreaming(), libpqsrv_get_result_last(), listAllDbs(), listCasts(), listCollations(), listConversions(), listDbRoleSettings(), listDefaultACLs(), listDomains(), listEventTriggers(), listExtendedStats(), listExtensionContents(), listExtensions(), listForeignDataWrappers(), listForeignServers(), listForeignTables(), listLanguages(), listLargeObjects(), listOneExtensionContents(), listOperatorClasses(), listOperatorFamilies(), listOpFamilyFunctions(), listOpFamilyOperators(), listPartitionedTables(), listPublications(), listSchemas(), listTables(), listTSConfigs(), listTSConfigsVerbose(), listTSDictionaries(), listTSParsers(), listTSParsersVerbose(), listTSTemplates(), listUserMappings(), lo_close(), lo_creat(), lo_create(), lo_initialize(), lo_lseek(), lo_lseek64(), lo_open(), lo_read(), lo_tell(), lo_tell64(), lo_truncate(), lo_truncate64(), lo_unlink(), lo_write(), lockTableForWorker(), lookup_object_oid(), main(), materializeResult(), objectDescription(), old_9_6_invalidate_hash_indexes(), permissionsList(), pgfdw_cancel_query_end(), pgfdw_exec_cleanup_query_end(), pgfdw_finish_pre_commit_cleanup(), pgfdw_get_cleanup_result(), pgfdw_report_error(), pgfdw_xact_callback(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresEndDirectModify(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), postgresReScanForeignScan(), pqClearAsyncResult(), PQconnectPoll(), PQcopyResult(), PQencryptPasswordConn(), pqEndcopy3(), PQexecFinish(), PQexecStart(), pqGetErrorNotice3(), pqInternalNotice(), PQmakeEmptyPGresult(), PQsetClientEncoding(), prepare_common(), prepare_foreign_modify(), prepareCommand(), process_query_result(), process_queued_fetch_requests(), process_result(), processExtensionTables(), processQueryResult(), readCommandResponse(), ReceiveCopyData(), ReceiveXlogStream(), reindex_all_databases(), retrieve_objects(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_permutation(), run_simple_command(), run_simple_query(), RunIdentifySystem(), SendQuery(), server_is_in_recovery(), set_frozenxids(), set_locale_and_encoding(), set_replication_progress(), set_restrict_relation_kind(), setup_connection(), setup_publisher(), sql_conn(), sql_exec(), start_lo_xact(), store_returning_result(), storeQueryResult(), StreamLogicalLog(), TableCommandResultHandler(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), try_complete_step(), tryExecuteStatement(), vacuum_all_databases(), vacuumlo(), and wait_for_connection_state().
int PQclientEncoding | ( | const PGconn * | conn | ) |
Definition at line 7643 of file fe-connect.c.
References pg_conn::client_encoding, conn, CONNECTION_OK, and pg_conn::status.
Referenced by appendQualifiedRelation(), appendStringLiteralConn(), dblink_connect(), dblink_get_conn(), escape_append_literal(), escape_fmt_id(), exec_command_encoding(), gen_reindex_command(), get_parallel_tabidx_list(), get_parallel_tables_list(), main(), processSQLNamePattern(), retrieve_objects(), SendQuery(), setup_connection(), SyncVariables(), test_one_vector_escape(), and test_psql_parse().
Definition at line 2539 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), PqMsg_Close, and PQsendTypedCommand().
Referenced by test_prepared().
Definition at line 2521 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), PqMsg_Close, PQsendTypedCommand(), and stmt.
Referenced by test_prepared().
char * PQcmdStatus | ( | PGresult * | res | ) |
Definition at line 3752 of file fe-exec.c.
References pg_result::cmdStatus.
Referenced by dblink_exec(), ecpg_process_output(), ExecQueryAndProcessResults(), materializeResult(), PrintQueryStatus(), and test_pipelined_insert().
char * PQcmdTuples | ( | PGresult * | res | ) |
Definition at line 3822 of file fe-exec.c.
References pg_result::cmdStatus, pg_result::noticeHooks, and pqInternalNotice().
Referenced by ecpg_process_output(), execute_dml_stmt(), execute_foreign_modify(), and SetResultVariables().
PQconninfoOption * PQconndefaults | ( | void | ) |
Definition at line 2127 of file fe-connect.c.
References conninfo_add_defaults(), conninfo_init(), initPQExpBuffer(), PQconninfoFree(), PQExpBufferDataBroken, and termPQExpBuffer().
Referenced by check_pghost_envvar(), dblink_fdw_validator(), do_connect(), get_connect_string(), GetDbnameFromConnectionOptions(), InitPgFdwOptions(), and main().
PGconn * PQconnectdb | ( | const char * | conninfo | ) |
Definition at line 792 of file fe-connect.c.
References conn, CONNECTION_BAD, pqConnectDBComplete(), PQconnectStart(), and pg_conn::status.
Referenced by connect_database(), get_db_conn(), and main().
PGconn * PQconnectdbParams | ( | const char *const * | keywords, |
const char *const * | values, | ||
int | expand_dbname | ||
) |
Definition at line 737 of file fe-connect.c.
References conn, CONNECTION_BAD, keywords, pqConnectDBComplete(), PQconnectStartParams(), pg_conn::status, and values.
Referenced by ConnectDatabase(), connectDatabase(), copy_connection(), doConnect(), ECPGconnect(), GetConnection(), main(), sql_conn(), and vacuumlo().
int PQconnectionNeedsPassword | ( | const PGconn * | conn | ) |
Definition at line 7606 of file fe-connect.c.
References conn, password, pg_conn::password_needed, and PQpass().
Referenced by ConnectDatabase(), connectDatabase(), do_connect(), doConnect(), GetConnection(), main(), sql_conn(), and vacuumlo().
int PQconnectionUsedGSSAPI | ( | const PGconn * | conn | ) |
Definition at line 7632 of file fe-connect.c.
References conn, and pg_conn::gssapi_used.
Referenced by dblink_security_check(), exec_command_conninfo(), and pgfdw_security_check().
int PQconnectionUsedPassword | ( | const PGconn * | conn | ) |
Definition at line 7621 of file fe-connect.c.
References conn, and pg_conn::password_needed.
Referenced by ConnectDatabase(), dblink_security_check(), exec_command_conninfo(), libpqrcv_connect(), and pgfdw_security_check().
PostgresPollingStatusType PQconnectPoll | ( | PGconn * | conn | ) |
Definition at line 2842 of file fe-connect.c.
References SockAddr::addr, AddrInfo::addr, pg_conn::addr, pg_conn::allowed_enc_methods, pg_conn::altsock, appendPQExpBufferChar(), pg_conn::appname, Assert(), pg_conn::async_auth, pg_conn::asyncStatus, AUTH_REQ_OK, pg_conn::auth_req_received, CancelRequestPacket::backendPID, pg_conn::be_key, pg_conn::be_pid, CANCEL_REQUEST_CODE, CancelRequestPacket::cancelAuthCode, pg_conn::cancelRequest, CancelRequestPacket::cancelRequestCode, CHT_HOST_ADDRESS, CHT_HOST_NAME, CHT_UNIX_SOCKET, pg_conn::cleanup_async_auth, conn, connect, connectFailureMessage(), CONNECTION_AUTH_OK, CONNECTION_AUTHENTICATING, CONNECTION_AWAITING_RESPONSE, CONNECTION_BAD, CONNECTION_CHECK_STANDBY, CONNECTION_CHECK_TARGET, CONNECTION_CHECK_WRITABLE, CONNECTION_CONSUME, CONNECTION_FAILED, CONNECTION_GSS_STARTUP, CONNECTION_MADE, CONNECTION_NEEDED, CONNECTION_OK, CONNECTION_SSL_STARTUP, CONNECTION_STARTED, connectNoDelay(), pg_conn::connhost, pg_conn::connip, pg_conn::current_enc_method, PQExpBufferData::data, pg_conn::default_transaction_read_only, EINPROGRESS, EINTR, emitHostIdentityInfo(), ENC_GSSAPI, ENC_SSL, ENCRYPTION_NEGOTIATION_FAILED, EnvironmentOptions, err(), ERRCODE_APPNAME_UNKNOWN, ERRCODE_CANNOT_CONNECT_NOW, pg_conn::errorMessage, EWOULDBLOCK, pg_conn::failed_enc_methods, AddrInfo::family, pg_conn::fbappname, free, gai_strerror(), getHostaddr(), getpeereid(), pg_conn::gssencmode, pg_conn_host::host, pg_conn_host::hostaddr, i, pg_conn::in_hot_standby, pg_conn::inCursor, pg_conn::inEnd, init_allowed_encryption_methods(), pg_conn::inStart, j, pg_conn::laddr, pg_conn::last_sqlstate, PQExpBufferData::len, libpq_append_conn_error(), libpq_gettext, LOAD_BALANCE_RANDOM, pg_conn::load_balance_type, MAX_ERRLEN, MAXPGPATH, MemSet, pg_conn::naddr, pg_conn::nconnhost, NEGOTIATE_GSS_CODE, NEGOTIATE_SSL_CODE, pg_conn::oauth_want_retry, pg_conn::Pfdebug, PG_BOOL_NO, PG_BOOL_UNKNOWN, PG_BOOL_YES, PG_DIAG_SQLSTATE, pg_fe_getusername(), pg_fe_sendauth(), pg_freeaddrinfo_all(), pg_getaddrinfo_all(), pg_GSS_have_cred_cache(), pg_hton32, pg_oauth_mech, pg_prng_uint64_range(), PG_PROTOCOL, pg_set_noblock(), PG_STRERROR_R_BUFLEN, PGASYNC_BUSY, PGASYNC_IDLE, PGINVALID_SOCKET, pgpassfileWarning(), PGRES_FATAL_ERROR, PGRES_POLLING_FAILED, PGRES_POLLING_OK, PGRES_POLLING_READING, PGRES_POLLING_WRITING, PGRES_TUPLES_OK, pg_conn::pipelineStatus, pg_conn_host::port, portstr, PQ_PIPELINE_OFF, pqBuildStartupPacket3(), pqCheckInBufferSpace(), PQclear(), pqClearAsyncResult(), pqClearConnErrorState, pqClearOAuthToken(), PQconsumeInput(), pqDropConnection(), pqDropServerData(), pqFlush(), pqGetc(), pqGetErrorNotice3(), pqGetInt(), pqGetNegotiateProtocolVersion3(), PQgetResult(), pqGets_append(), PQgetvalue(), PQisBusy(), PqMsg_AuthenticationRequest, PqMsg_ErrorResponse, PqMsg_NegotiateProtocolVersion, PQntuples(), pqPacketSend(), pqParseDone(), pqParseIntParam(), pqReadData(), PQresultErrorField(), PQresultStatus(), pqsecure_open_client(), pqsecure_open_gss(), PQsendQueryContinue(), pqTraceOutputCharResponse(), PQTRANS_IDLE, pg_conn::prng_state, pg_conn::pversion, pg_conn::raddr, release_conn_addrinfo(), pg_conn::requirepeer, pg_result::resultStatus, SockAddr::salen, pg_conn::sasl, pg_conn::send_appname, sendTerminateConn(), SERVER_TYPE_PREFER_STANDBY, SERVER_TYPE_PREFER_STANDBY_PASS2, SERVER_TYPE_PRIMARY, SERVER_TYPE_READ_ONLY, SERVER_TYPE_READ_WRITE, SERVER_TYPE_STANDBY, setKeepalivesCount(), setKeepalivesIdle(), setKeepalivesInterval(), setTCPUserTimeout(), pg_conn::sigpipe_flag, pg_conn::sigpipe_so, snprintf, pg_conn::sock, SOCK_ERRNO, SOCK_STRERROR, socket, pg_conn::ssl_in_use, pg_conn::sslnegotiation, pg_conn::status, STATUS_OK, store_conn_addrinfo(), strerror_r, pg_conn::sversion, pg_conn::target_server_type, pg_conn::try_next_addr, pg_conn::try_next_host, pg_conn_host::type, UNIXSOCK_PATH, UNIXSOCK_PATH_BUFLEN, useKeepalives(), val, pg_conn::whichaddr, pg_conn::whichhost, and pg_conn::xactStatus.
Referenced by libpqrcv_connect(), libpqsrv_connect_internal(), main(), PQcancelPoll(), pqConnectDBComplete(), pqConnectDBStart(), PQresetPoll(), process_slot(), and wait_until_connected().
PGconn * PQconnectStart | ( | const char * | conninfo | ) |
Definition at line 920 of file fe-connect.c.
References conn, CONNECTION_BAD, connectOptions1(), pqConnectDBStart(), pqConnectOptions2(), pqMakeEmptyPGconn(), and pg_conn::status.
Referenced by libpqsrv_connect(), main(), PQconnectdb(), PQping(), and start_conn().
PGconn * PQconnectStartParams | ( | const char *const * | keywords, |
const char *const * | values, | ||
int | expand_dbname | ||
) |
Definition at line 839 of file fe-connect.c.
References conn, CONNECTION_BAD, conninfo_array_parse(), pg_conn::errorMessage, fillPGconn(), keywords, pqConnectDBStart(), pqConnectOptions2(), PQconninfoFree(), pqMakeEmptyPGconn(), pg_conn::status, and values.
Referenced by do_connect(), libpqrcv_connect(), libpqsrv_connect_params(), PQconnectdbParams(), and PQpingParams().
PQconninfoOption * PQconninfo | ( | PGconn * | conn | ) |
Definition at line 7324 of file fe-connect.c.
References conn, conninfo_init(), conninfo_storeval(), initPQExpBuffer(), PQconninfoOptions, PQExpBufferDataBroken, and termPQExpBuffer().
Referenced by copy_connection(), do_connect(), GenerateRecoveryConfig(), and libpqrcv_get_conninfo().
void PQconninfoFree | ( | PQconninfoOption * | connOptions | ) |
Definition at line 7368 of file fe-connect.c.
References free, and option::val.
Referenced by check_pghost_envvar(), connectDatabase(), connectOptions1(), conninfo_array_parse(), conninfo_parse(), conninfo_uri_parse(), dblink_connstr_has_pw(), do_connect(), GenerateRecoveryConfig(), get_base_conninfo(), GetConnection(), GetDbnameFromConnectionOptions(), libpqrcv_check_conninfo(), libpqrcv_get_conninfo(), libpqrcv_get_dbname_from_conninfo(), PQconndefaults(), and PQconnectStartParams().
PQconninfoOption * PQconninfoParse | ( | const char * | conninfo, |
char ** | errmsg | ||
) |
Definition at line 6084 of file fe-connect.c.
References PQExpBufferData::data, errmsg(), initPQExpBuffer(), parse_connection_string(), PQExpBufferDataBroken, and termPQExpBuffer().
Referenced by connectDatabase(), dblink_connstr_has_pw(), do_connect(), get_base_conninfo(), GetConnection(), GetDbnameFromConnectionOptions(), libpqrcv_check_conninfo(), libpqrcv_get_dbname_from_conninfo(), and main().
int PQconsumeInput | ( | PGconn * | conn | ) |
Definition at line 1984 of file fe-exec.c.
References conn, pqFlush(), pqIsnonblocking, and pqReadData().
Referenced by advanceConnectionState(), confirm_query_canceled_impl(), CopyStreamReceive(), dblink_get_notify(), dblink_is_busy(), do_sql_command_end(), ecpg_process_output(), libpqrcv_PQgetResult(), libpqrcv_receive(), libpqsrv_get_result(), main(), pgfdw_cancel_query_end(), pgfdw_exec_cleanup_query_end(), pgfdw_get_cleanup_result(), postgresForeignAsyncNotify(), PQconnectPoll(), PrintNotifications(), process_slot(), StreamLogicalLog(), test_nosync(), test_pipelined_insert(), test_uniqviol(), try_complete_step(), and wait_on_slots().
Definition at line 318 of file fe-exec.c.
References pg_result::attDescs, pg_result::client_encoding, pg_result::cmdStatus, generate_unaccent_rules::dest, PGEventResultCopy::dest, dupEvents(), pg_result::events, i, pgresAttValue::len, pg_result::nEvents, pg_result::noticeHooks, pg_result::ntups, pg_result::numAttributes, PG_COPYRES_ATTRS, PG_COPYRES_EVENTS, PG_COPYRES_NOTICEHOOKS, PG_COPYRES_TUPLES, PGEVT_RESULTCOPY, PGRES_TUPLES_OK, PQclear(), PQmakeEmptyPGresult(), PQsetResultAttrs(), PQsetvalue(), PGEvent::resultInitialized, PGEventResultCopy::src, pg_result::tuples, and pgresAttValue::value.
Referenced by pqRowProcessor().
char * PQdb | ( | const PGconn * | conn | ) |
Definition at line 7381 of file fe-connect.c.
References conn, and pg_conn::dbName.
Referenced by append_rel_pattern_filtered_cte(), cluster_one_database(), do_connect(), exec_command_conninfo(), find_matching_idle_slot(), get_prompt(), GetTableInfo(), main(), prohibit_crossdb_refs(), reindex_one_database(), run_command(), run_reindex_command(), run_vacuum_command(), slashUsage(), SyncVariables(), TableCommandResultHandler(), vacuum_one_database(), validateSQLNamePattern(), and WriteHead().
int PQdefaultAuthDataHook | ( | PGauthData | type, |
PGconn * | conn, | ||
void * | data | ||
) |
Definition at line 1601 of file fe-auth.c.
Referenced by PQsetAuthDataHook().
int PQdefaultSSLKeyPassHook_OpenSSL | ( | char * | buf, |
int | size, | ||
PGconn * | conn | ||
) |
Definition at line 1842 of file fe-secure-openssl.c.
References buf, conn, fprintf, libpq_gettext, and pg_conn::sslpassword.
Referenced by PQssl_passwd_cb().
Definition at line 2474 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), PqMsg_Describe, and PQsendTypedCommand().
Referenced by test_prepared().
Definition at line 2455 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), PqMsg_Describe, PQsendTypedCommand(), and stmt.
Referenced by DescribeQuery(), ECPGdescribe(), and test_prepared().
void PQdisplayTuples | ( | const PGresult * | res, |
FILE * | fp, | ||
int | fillAlign, | ||
const char * | fieldSep, | ||
int | printHeader, | ||
int | quiet | ||
) |
Definition at line 574 of file fe-print.c.
References DEFAULT_FIELD_SEP, fill(), fprintf, free, i, j, libpq_gettext, malloc, PQfname(), PQgetlength(), PQgetvalue(), PQnfields(), PQntuples(), and generate_unaccent_rules::stdout.
int PQdsplen | ( | const char * | s, |
int | encoding | ||
) |
Definition at line 1253 of file fe-misc.c.
References encoding, and pg_encoding_dsplen().
Referenced by get_prompt(), pg_wcsformat(), pg_wcssize(), pg_wcswidth(), and strlen_max_width().
char * PQencryptPassword | ( | const char * | passwd, |
const char * | user | ||
) |
Definition at line 1363 of file fe-auth.c.
References free, malloc, MD5_PASSWD_LEN, pg_md5_encrypt(), and user.
char * PQencryptPasswordConn | ( | PGconn * | conn, |
const char * | passwd, | ||
const char * | user, | ||
const char * | algorithm | ||
) |
Definition at line 1406 of file fe-auth.c.
References conn, free, libpq_append_conn_error(), malloc, MAX_ALGORITHM_NAME_LEN, MD5_PASSWD_LEN, pg_fe_scram_build_secret(), pg_md5_encrypt(), PGRES_TUPLES_OK, PQclear(), pqClearConnErrorState, PQexec(), PQgetvalue(), PQnfields(), PQntuples(), PQresultStatus(), pg_conn::scram_sha_256_iterations, user, and val.
Referenced by main(), and PQchangePassword().
int PQendcopy | ( | PGconn * | conn | ) |
Definition at line 2949 of file fe-exec.c.
References conn, and pqEndcopy3().
Referenced by ecpg_check_PQresult(), initPopulateTable(), and libpqrcv_endstreaming().
int PQenterPipelineMode | ( | PGconn * | conn | ) |
Definition at line 3042 of file fe-exec.c.
References pg_conn::asyncStatus, conn, libpq_append_conn_error(), PGASYNC_IDLE, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, and PQ_PIPELINE_ON.
Referenced by ExecQueryAndProcessResults(), executeMetaCommand(), test_disallowed_in_pipeline(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), and test_uniqviol().
int PQenv2encoding | ( | void | ) |
Definition at line 1262 of file fe-misc.c.
References encoding, pg_char_to_encoding, PG_SQL_ASCII, and str.
Referenced by main().
char * PQerrorMessage | ( | const PGconn * | conn | ) |
Definition at line 7553 of file fe-connect.c.
References conn, PQExpBufferData::data, pg_conn::errorMessage, libpq_gettext, and PQExpBufferBroken.
Referenced by _doSetSessionAuth(), _printTableAccessMethodNoStorage(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), AcceptResult(), advanceConnectionState(), BaseBackup(), check_loadable_libraries(), check_prepare_conn(), CheckCopyStreamStop(), cluster_one_database(), compile_database_list(), compile_relation_list_one_db(), confirm_query_canceled_impl(), connect_database(), connect_pg_server(), ConnectDatabase(), connectDatabase(), connectToServer(), copy_connection(), CopyStreamPoll(), CopyStreamReceive(), CreateReplicationSlot(), dblink_connect(), dblink_error_message(), dblink_get_conn(), dblink_res_error(), dblink_res_internalerror(), dblink_send_query(), DescribeQuery(), die_on_query_failure(), do_connect(), do_lo_export(), do_lo_import(), do_lo_unlink(), doConnect(), DropReplicationSlot(), dump_lo_buf(), dumpLOs(), dumpTableData_copy(), ecpg_check_PQresult(), ecpg_raise_backend(), ECPGconnect(), EndDBCopyMode(), escape_identifier(), escape_literal(), escape_string_conn(), exec_command_password(), ExecQueryAndProcessResults(), executeCommand(), executeQuery(), executeQueryOrDie(), ExecuteSqlCommand(), ExecuteSqlCommandBuf(), executeStatement(), get_table_relkind(), GetConnection(), GetSlotInformation(), GetTableInfo(), handleCopyIn(), handleCopyOut(), HandleEndOfCopyStream(), initPopulateTable(), libpqrcv_alter_slot(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_identify_system(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_send(), libpqrcv_startstreaming(), main(), my_truncate(), overwrite(), pgfdw_cancel_query_end(), pgfdw_report_error(), pickout(), PQcancelErrorMessage(), prepareCommand(), process_query_result(), process_queued_fetch_requests(), process_result(), process_slot(), ProcessXLogDataMsg(), psql_get_variable(), readCommandResponse(), ReceiveCopyData(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_command(), run_permutation(), run_reindex_command(), run_vacuum_command(), RunIdentifySystem(), send_cancellable_query_impl(), sendFeedback(), SendQuery(), sql_conn(), sql_exec(), start_postmaster(), StartRestoreLO(), storeQueryResult(), StreamLogicalLog(), TableCommandResultHandler(), test_cancel(), test_disallowed_in_pipeline(), test_multi_pipelines(), test_nosync(), test_one_vector(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), test_uniqviol(), threadRun(), try_complete_step(), tryExecuteStatement(), vacuumlo(), verify_btree_slot_handler(), verify_heap_slot_handler(), and wait_for_connection_state().
unsigned char * PQescapeBytea | ( | const unsigned char * | from, |
size_t | from_length, | ||
size_t * | to_length | ||
) |
Definition at line 4528 of file fe-exec.c.
References PQescapeByteaInternal(), and static_std_strings.
unsigned char * PQescapeByteaConn | ( | PGconn * | conn, |
const unsigned char * | from, | ||
size_t | from_length, | ||
size_t * | to_length | ||
) |
Definition at line 4512 of file fe-exec.c.
References pg_conn::cmd_queue_head, conn, pqClearConnErrorState, PQescapeByteaInternal(), pg_conn::std_strings, and pg_conn::sversion.
char * PQescapeIdentifier | ( | PGconn * | conn, |
const char * | str, | ||
size_t | len | ||
) |
Definition at line 4369 of file fe-exec.c.
References conn, len, PQescapeInternal(), and str.
Referenced by create_publication(), create_subscription(), drop_publication(), enable_subscription(), escape_identifier(), initCreatePKeys(), initCreateTables(), main(), PQchangePassword(), psql_get_variable(), stringlist_to_identifierstr(), and vacuumlo().
char * PQescapeLiteral | ( | PGconn * | conn, |
const char * | str, | ||
size_t | len | ||
) |
Definition at line 4363 of file fe-exec.c.
References conn, len, PQescapeInternal(), and str.
Referenced by check_and_drop_existing_subscriptions(), create_logical_replication_slot(), create_publication(), create_subscription(), DescribeQuery(), drop_replication_slot(), escape_literal(), libpqrcv_startstreaming(), PQchangePassword(), psql_get_variable(), set_locale_and_encoding(), and set_replication_progress().
size_t PQescapeString | ( | char * | to, |
const char * | from, | ||
size_t | length | ||
) |
Definition at line 4198 of file fe-exec.c.
References PQescapeStringInternal(), static_client_encoding, and static_std_strings.
Referenced by escape_string(), get_comma_elts(), and quote_postgres().
size_t PQescapeStringConn | ( | PGconn * | conn, |
char * | to, | ||
const char * | from, | ||
size_t | length, | ||
int * | error | ||
) |
Definition at line 4176 of file fe-exec.c.
References pg_conn::client_encoding, pg_conn::cmd_queue_head, conn, error(), pqClearConnErrorState, PQescapeStringInternal(), and pg_conn::std_strings.
Referenced by AppendStringCommandOption(), appendStringLiteralConn(), check_loadable_libraries(), do_lo_import(), and escape_string_conn().
Definition at line 2262 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendQuery().
Referenced by _doSetSessionAuth(), _printTableAccessMethodNoStorage(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), check_and_drop_existing_subscriptions(), check_and_drop_publications(), check_loadable_libraries(), check_prepare_conn(), check_publisher(), check_subscriber(), connect_database(), create_logical_replication_slot(), create_publication(), create_subscription(), CreateReplicationSlot(), deallocate_one(), DescribeQuery(), drop_existing_subscriptions(), drop_failover_replication_slots(), drop_publication(), drop_replication_slot(), DropReplicationSlot(), ecpg_autostart_transaction(), ecpg_execute(), ecpg_is_type_an_array(), ECPGsetcommit(), ECPGtrans(), enable_subscription(), executeCommand(), executeMaintenanceCommand(), executeQuery(), executeQueryOrDie(), ExecuteSqlCommand(), ExecuteSqlQuery(), ExecuteSqlStatement(), executeStatement(), generate_object_name(), get_create_object_cmd(), get_primary_sysid(), GetConnection(), GetSlotInformation(), GetTableInfo(), init_libpq_conn(), initPopulateTable(), libpq_traverse_files(), lo_initialize(), lockTableForWorker(), lookup_object_oid(), main(), PQchangePassword(), PQencryptPasswordConn(), PQsetClientEncoding(), PSQLexec(), ReceiveXlogStream(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_permutation(), run_simple_command(), run_simple_query(), RunIdentifySystem(), SendQuery(), server_is_in_recovery(), set_replication_progress(), setup_publisher(), sql_conn(), sql_exec(), StreamLogicalLog(), test_disallowed_in_pipeline(), test_pipeline_abort(), test_prepared(), test_transaction(), test_uniqviol(), tryExecuteStatement(), and vacuumlo().
PGresult * PQexecParams | ( | PGconn * | conn, |
const char * | command, | ||
int | nParams, | ||
const Oid * | paramTypes, | ||
const char *const * | paramValues, | ||
const int * | paramLengths, | ||
const int * | paramFormats, | ||
int | resultFormat | ||
) |
Definition at line 2276 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendQueryParams().
Referenced by ecpg_execute(), get_table_relkind(), libpq_fetch_file(), main(), and wait_for_connection_state().
PGresult * PQexecPrepared | ( | PGconn * | conn, |
const char * | stmtName, | ||
int | nParams, | ||
const char *const * | paramValues, | ||
const int * | paramLengths, | ||
const int * | paramFormats, | ||
int | resultFormat | ||
) |
Definition at line 2323 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendQueryPrepared().
Referenced by ecpg_execute(), and try_complete_step().
int PQexitPipelineMode | ( | PGconn * | conn | ) |
Definition at line 3073 of file fe-exec.c.
References pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, libpq_append_conn_error(), PGASYNC_BUSY, PGASYNC_COPY_BOTH, PGASYNC_COPY_IN, PGASYNC_COPY_OUT, PGASYNC_IDLE, PGASYNC_PIPELINE_IDLE, PGASYNC_READY, PGASYNC_READY_MORE, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, and pqFlush().
Referenced by discardUntilSync(), ExecQueryAndProcessResults(), readCommandResponse(), test_disallowed_in_pipeline(), test_multi_pipelines(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), and test_transaction().
int PQfformat | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3708 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), and pgresAttDesc::format.
Referenced by ecpg_get_data(), ecpg_store_result(), and process_queued_fetch_requests().
void PQfinish | ( | PGconn * | conn | ) |
Definition at line 5224 of file fe-connect.c.
References conn, freePGconn(), and pqClosePGconn().
Referenced by appendQualifiedRelation(), BaseBackup(), check_for_connection_status(), check_for_pg_role_prefix(), check_for_prepared_transactions(), check_is_install_user(), check_loadable_libraries(), check_new_cluster_logical_replication_slots(), check_new_cluster_subscription_configuration(), check_old_cluster_subscription_state(), CheckConnection(), cluster_all_databases(), cluster_one_database(), connect_database(), ConnectDatabase(), connectDatabase(), connectToServer(), create_logical_replication_slots(), create_new_objects(), disconnect_atexit(), disconnect_database(), DisconnectDatabase(), disconnectDatabase(), do_connect(), doConnect(), dumpRoleGUCPrivs(), dumpRoleMembership(), dumpTablespaces(), ecpg_finish(), executeCommand(), executeQuery(), executeQueryOrDie(), exit_nicely(), expand_dbname_patterns(), finishCon(), get_db_infos(), get_subscription_count(), get_tablespace_paths(), get_template0_info(), GetConnection(), libpqrcv_connect(), libpqrcv_disconnect(), libpqsrv_connect_internal(), libpqsrv_disconnect(), LogStreamerMain(), main(), old_9_6_invalidate_hash_indexes(), PQcancelFinish(), PQping(), PQpingParams(), process_slot(), ReconnectToServer(), reindex_all_databases(), reindex_one_database(), runInitSteps(), set_frozenxids(), set_locale_and_encoding(), sql_conn(), sql_exec(), start_postmaster(), StreamLog(), StreamLogicalLog(), vacuum_all_databases(), vacuum_one_database(), and vacuumlo().
int PQflush | ( | PGconn * | conn | ) |
Definition at line 4000 of file fe-exec.c.
References conn, CONNECTION_BAD, pqFlush(), and pg_conn::status.
Referenced by CheckCopyStreamStop(), ExecQueryAndProcessResults(), HandleEndOfCopyStream(), libpqrcv_endstreaming(), libpqrcv_send(), prepareToTerminate(), ProcessXLogDataMsg(), sendFeedback(), test_nosync(), test_pipelined_insert(), and test_uniqviol().
int PQfmod | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3741 of file fe-exec.c.
References pg_result::attDescs, pgresAttDesc::atttypmod, and check_field_number().
Referenced by DescribeQuery(), and ECPGget_desc().
PGresult * PQfn | ( | PGconn * | conn, |
int | fnid, | ||
int * | result_buf, | ||
int * | result_len, | ||
int | result_is_int, | ||
const PQArgBlock * | args, | ||
int | nargs | ||
) |
Definition at line 2980 of file fe-exec.c.
References generate_unaccent_rules::args, pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, libpq_append_conn_error(), PGASYNC_IDLE, pgHavePendingResult, PGINVALID_SOCKET, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqClearConnErrorState, pqFunctionCall3(), and pg_conn::sock.
Referenced by lo_close(), lo_creat(), lo_create(), lo_lseek(), lo_lseek64(), lo_open(), lo_read(), lo_tell(), lo_tell64(), lo_truncate(), lo_truncate64(), lo_unlink(), and lo_write().
char * PQfname | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3567 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), and pgresAttDesc::name.
Referenced by DescribeQuery(), do_header(), dumpTableData_insert(), ecpg_build_compat_sqlda(), ecpg_build_native_sqlda(), ECPGget_desc(), indexOfColumn(), libpqrcv_processTuples(), main(), PQdisplayTuples(), PQprint(), PQprintTuples(), printCrosstab(), printQuery(), readCommandResponse(), sql_exec(), sqlda_compat_empty_size(), and StoreQueryTuple().
int PQfnumber | ( | const PGresult * | res, |
const char * | field_name | ||
) |
Definition at line 3589 of file fe-exec.c.
References pg_result::attDescs, free, i, pgresAttDesc::name, pg_result::numAttributes, and pg_tolower().
Referenced by append_depends_on_extension(), binary_upgrade_set_type_oids_by_type_oid(), buildMatViewRefreshDependencies(), check_for_connection_status(), check_for_pg_role_prefix(), collectComments(), collectSecLabels(), describeOneTableDetails(), dropRoles(), dumpAgg(), dumpBaseType(), dumpCollation(), dumpCompositeType(), dumpCompositeTypeColComments(), dumpConversion(), dumpDatabase(), dumpDomain(), dumpEnumType(), dumpFunc(), dumpOpclass(), dumpOpfamily(), dumpOpr(), dumpRangeType(), dumpRelationStats(), dumpRoleMembership(), dumpRoles(), dumpTableSchema(), dumpTSConfig(), dumpUserMappings(), get_db_infos(), get_tablespace_paths(), get_template0_info(), getAccessMethods(), getAggregates(), getCasts(), getCollations(), getConstraints(), getConversions(), getDefaultACLs(), getDependencies(), getDomainConstraints(), getEventTriggers(), getExtendedStatistics(), getExtensionMembership(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getIndexes(), getInherits(), getLOs(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getPolicies(), getProcLangs(), getPublicationNamespaces(), getPublications(), getPublicationTables(), getRules(), getSubscriptions(), getSubscriptionTables(), getTableAttrs(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), old_9_6_invalidate_hash_indexes(), process_data_type_check(), process_extension_updates(), process_incompat_polymorphics(), process_isn_and_int8_passing_mismatch(), process_old_cluster_logical_slot_infos(), process_old_sub_state_check(), process_rel_infos(), process_user_defined_encoding_conversions(), process_user_defined_postfix_ops(), process_with_oids_check(), processExtensionTables(), set_frozenxids(), and show_binary_results().
void PQfreeCancel | ( | PGcancel * | cancel | ) |
Definition at line 417 of file fe-cancel.c.
References free.
Referenced by PQrequestCancel(), ResetCancelConn(), set_archive_cancel_info(), SetCancelConn(), and test_cancel().
void PQfreemem | ( | void * | ptr | ) |
Definition at line 4032 of file fe-exec.c.
References free.
Referenced by check_and_drop_existing_subscriptions(), create_logical_replication_slot(), create_publication(), create_subscription(), dblink_get_notify(), DescribeQuery(), do_connect(), drop_publication(), drop_replication_slot(), dumpTableData_copy(), ecpg_process_output(), enable_subscription(), escape_identifier(), escape_literal(), exec_command_errverbose(), get_base_conninfo(), handleCopyOut(), HandleCopyStream(), initCreatePKeys(), initCreateTables(), libpqrcv_check_conninfo(), libpqrcv_disconnect(), libpqrcv_get_dbname_from_conninfo(), libpqrcv_receive(), libpqrcv_startstreaming(), main(), PQchangePassword(), PQfreeNotify(), PrintNotifications(), psql_get_variable(), ReceiveCopyData(), set_locale_and_encoding(), set_replication_progress(), StreamLogicalLog(), stringlist_to_identifierstr(), try_complete_step(), and vacuumlo().
int PQfsize | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3730 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), and pgresAttDesc::typlen.
Referenced by ecpg_build_compat_sqlda(), and ECPGget_desc().
Definition at line 3686 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), InvalidOid, and pgresAttDesc::tableid.
int PQftablecol | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3697 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), and pgresAttDesc::columnid.
Definition at line 3719 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), InvalidOid, and pgresAttDesc::typid.
Referenced by DescribeQuery(), dumpTableData_insert(), ecpg_build_compat_sqlda(), ecpg_build_native_sqlda(), ecpg_store_result(), ECPGget_desc(), printCrosstab(), printQuery(), process_queued_fetch_requests(), sqlda_common_total_size(), and test_prepared().
int PQfullProtocolVersion | ( | const PGconn * | conn | ) |
Definition at line 7533 of file fe-connect.c.
References conn, CONNECTION_BAD, PG_PROTOCOL_FULL, pg_conn::pversion, and pg_conn::status.
PQauthDataHook_type PQgetAuthDataHook | ( | void | ) |
Definition at line 349 of file fe-cancel.c.
References pg_cancel::be_key, pg_conn::be_key, pg_cancel::be_pid, pg_conn::be_pid, conn, free, pg_cancel::keepalives, pg_conn::keepalives, pg_cancel::keepalives_count, pg_conn::keepalives_count, pg_cancel::keepalives_idle, pg_conn::keepalives_idle, pg_cancel::keepalives_interval, pg_conn::keepalives_interval, malloc, PGINVALID_SOCKET, pg_cancel::pgtcp_user_timeout, pg_conn::pgtcp_user_timeout, pqParseIntParam(), pg_cancel::raddr, pg_conn::raddr, and pg_conn::sock.
Referenced by PQrequestCancel(), set_archive_cancel_info(), SetCancelConn(), and test_cancel().
int PQgetCopyData | ( | PGconn * | conn, |
char ** | buffer, | ||
int | async | ||
) |
Definition at line 2816 of file fe-exec.c.
References pg_conn::asyncStatus, conn, libpq_append_conn_error(), PGASYNC_COPY_BOTH, PGASYNC_COPY_OUT, and pqGetCopyData3().
Referenced by CopyStreamReceive(), dumpTableData_copy(), ecpg_process_output(), handleCopyOut(), libpqrcv_receive(), ReceiveCopyData(), and StreamLogicalLog().
pg_usec_time_t PQgetCurrentTimeUSec | ( | void | ) |
Definition at line 1209 of file fe-misc.c.
References gettimeofday().
Referenced by pqConnectDBComplete(), PQsocketPoll(), and wait_until_connected().
void * PQgetgssctx | ( | PGconn * | conn | ) |
Definition at line 724 of file fe-secure-gssapi.c.
References conn.
int PQgetisnull | ( | const PGresult * | res, |
int | tup_num, | ||
int | field_num | ||
) |
Definition at line 3901 of file fe-exec.c.
References check_tuple_field_number(), pgresAttValue::len, NULL_LEN, and pg_result::tuples.
Referenced by addFooterToPublicationDesc(), BaseBackup(), compile_database_list(), compile_relation_list_one_db(), describeOneTableDetails(), determineNotNullFlags(), dumpAgg(), dumpBaseType(), dumpCollation(), dumpDatabase(), dumpDomain(), dumpFunc(), dumpRangeType(), dumpRelationStats(), dumpRoleMembership(), dumpRoles(), dumpTableData_insert(), ecpg_get_data(), ecpg_set_compat_sqlda(), ecpg_set_native_sqlda(), ECPGget_desc(), ExecQueryTuples(), get_template0_info(), getAggregates(), getExtendedStatistics(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getIndexes(), getLOs(), getNamespaces(), getPolicies(), getProcLangs(), getPublicationTables(), GetSlotInformation(), getSubscriptions(), getSubscriptionTables(), getTableAttrs(), GetTableInfo(), getTables(), getTSDictionaries(), getTypes(), libpq_fetch_file(), libpq_traverse_files(), libpqrcv_create_slot(), libpqrcv_processTuples(), listTSConfigsVerbose(), listTSParsersVerbose(), make_tuple_from_result_row(), materializeResult(), postgresImportForeignSchema(), printCrosstab(), printQuery(), PrintResultInCrosstab(), process_queued_fetch_requests(), retrieve_objects(), run_simple_query(), RunIdentifySystem(), sqlda_common_total_size(), StoreQueryTuple(), storeRow(), and verify_heap_slot_handler().
int PQgetlength | ( | const PGresult * | res, |
int | tup_num, | ||
int | field_num | ||
) |
Definition at line 3887 of file fe-exec.c.
References check_tuple_field_number(), pgresAttValue::len, NULL_LEN, and pg_result::tuples.
Referenced by createViewAsClause(), do_field(), ecpg_get_data(), ecpg_store_result(), ECPGget_desc(), libpq_fetch_file(), libpqrcv_readtimelinehistoryfile(), PQdisplayTuples(), process_queued_fetch_requests(), and show_binary_results().
int PQgetline | ( | PGconn * | conn, |
char * | buffer, | ||
int | length | ||
) |
Definition at line 2854 of file fe-exec.c.
References conn, and pqGetline3().
int PQgetlineAsync | ( | PGconn * | conn, |
char * | buffer, | ||
int | bufsize | ||
) |
Definition at line 2901 of file fe-exec.c.
References bufsize, conn, and pqGetlineAsync3().
Referenced by pqGetline3().
Definition at line 2062 of file fe-exec.c.
References Assert(), pg_conn::asyncStatus, conn, getCopyResult(), libpq_append_conn_error(), pg_result::nEvents, parseInput(), PGASYNC_BUSY, PGASYNC_COPY_BOTH, PGASYNC_COPY_IN, PGASYNC_COPY_OUT, PGASYNC_IDLE, PGASYNC_PIPELINE_IDLE, PGASYNC_READY, PGASYNC_READY_MORE, PGRES_COPY_BOTH, PGRES_COPY_IN, PGRES_COPY_OUT, PGRES_PIPELINE_SYNC, PGRES_TUPLES_CHUNK, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqCommandQueueAdvance(), PQfireResultCreateEvents(), pqFlush(), pqPipelineProcessQueue(), pqPrepareAsyncResult(), pqReadData(), pqSaveErrorResult(), pqSaveWriteError(), pqWait(), pg_conn::result, pg_result::resultStatus, and pg_conn::write_failed.
Referenced by advanceConnectionState(), BaseBackup(), ClearOrSaveAllResults(), confirm_query_canceled_impl(), consumeQueryResult(), discardAbortedPipelineResults(), discardUntilSync(), dumpTableData_copy(), ecpg_process_output(), EndDBCopyMode(), ExecQueryAndProcessResults(), handleCopyIn(), handleCopyOut(), HandleEndOfCopyStream(), libpqrcv_PQgetResult(), libpqsrv_get_result(), pgfdw_finish_pre_commit_cleanup(), pgfdw_get_cleanup_result(), PQconnectPoll(), pqEndcopy3(), PQexecFinish(), PQexecStart(), process_query_result(), process_queued_fetch_requests(), process_result(), readCommandResponse(), ReceiveCopyData(), ReceiveXlogStream(), StreamLogicalLog(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), test_uniqviol(), try_complete_step(), and wait_on_slots().
void * PQgetssl | ( | PGconn * | conn | ) |
Definition at line 1564 of file fe-secure-openssl.c.
References conn.
PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL | ( | void | ) |
Definition at line 1860 of file fe-secure-openssl.c.
References PQsslKeyPassHook.
char * PQgetvalue | ( | const PGresult * | res, |
int | tup_num, | ||
int | field_num | ||
) |
Definition at line 3876 of file fe-exec.c.
References check_tuple_field_number(), pg_result::tuples, and pgresAttValue::value.
Referenced by _check_database_version(), add_tablespace_footer(), addFooterToPublicationDesc(), append_depends_on_extension(), appendQualifiedRelation(), BaseBackup(), binary_upgrade_set_type_oids_by_type_oid(), buildMatViewRefreshDependencies(), check_and_drop_existing_subscriptions(), check_and_drop_publications(), check_for_connection_status(), check_for_pg_role_prefix(), check_is_install_user(), check_new_cluster_logical_replication_slots(), check_new_cluster_subscription_configuration(), check_old_cluster_subscription_state(), check_publisher(), check_subscriber(), cluster_all_databases(), collectBinaryUpgradeClassOids(), collectComments(), collectRoleNames(), collectSecLabels(), collectSequences(), compile_database_list(), compile_relation_list_one_db(), convertTSFunction(), create_logical_replication_slot(), createViewAsClause(), describeOneTableDetails(), describePublications(), describeRoles(), describeTableDetails(), determineNotNullFlags(), do_field(), drop_failover_replication_slots(), dropDBs(), dropRoles(), dropTablespaces(), dumpAgg(), dumpBaseType(), dumpCollation(), dumpCompositeType(), dumpCompositeTypeColComments(), dumpConversion(), dumpDatabase(), dumpDatabaseConfig(), dumpDatabases(), dumpDomain(), dumpEnumType(), dumpForeignServer(), dumpFunc(), dumpOpclass(), dumpOpfamily(), dumpOpr(), dumpRangeType(), dumpRelationStats(), dumpRoleGUCPrivs(), dumpRoleMembership(), dumpRoles(), dumpRule(), dumpSearchPath(), dumpSequence(), dumpSequenceData(), dumpStatisticsExt(), dumpTable(), dumpTableAttach(), dumpTableData_insert(), dumpTableSchema(), dumpTablespaces(), dumpTSConfig(), dumpTSDictionary(), dumpUserConfig(), dumpUserMappings(), ecpg_get_data(), ecpg_is_type_an_array(), ecpg_set_compat_sqlda(), ecpg_set_native_sqlda(), ecpg_store_result(), emitShSecLabels(), exec_command_password(), ExecQueryTuples(), expand_dbname_patterns(), expand_extension_name_patterns(), expand_foreign_server_name_patterns(), expand_schema_name_patterns(), expand_table_name_patterns(), generate_object_name(), get_create_object_cmd(), get_db_infos(), get_language_name(), get_loadable_libraries(), get_next_possible_free_pg_type_oid(), get_parallel_tabidx_list(), get_parallel_tables_list(), get_primary_sysid(), get_remote_estimate(), get_subscription_count(), get_synchronized_snapshot(), get_table_relkind(), get_tablespace_paths(), get_template0_info(), getAccessMethods(), getAdditionalACLs(), getAggregates(), getCasts(), getCollations(), getConstraints(), getConversions(), getDefaultACLs(), getDependencies(), getDomainConstraints(), getEventTriggers(), getExtendedStatistics(), getExtensionMembership(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFormattedTypeName(), getFuncs(), getIndexes(), getInherits(), getLOs(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getPartitioningInfo(), getPolicies(), getProcLangs(), getPublicationNamespaces(), getPublications(), getPublicationTables(), getRules(), GetSlotInformation(), getSubscriptions(), getSubscriptionTables(), getTableAttrs(), GetTableInfo(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), libpq_fetch_file(), libpq_traverse_files(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), listExtensionContents(), listSchemas(), listTSConfigsVerbose(), listTSParsersVerbose(), lo_initialize(), lookup_object_oid(), main(), make_tuple_from_result_row(), materializeResult(), old_9_6_invalidate_hash_indexes(), postgresAnalyzeForeignTable(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), PQconnectPoll(), PQdisplayTuples(), PQencryptPasswordConn(), PQprintTuples(), printCrosstab(), printQuery(), PrintResultInCrosstab(), process_data_type_check(), process_extension_updates(), process_incompat_polymorphics(), process_isn_and_int8_passing_mismatch(), process_old_cluster_logical_slot_infos(), process_old_sub_state_check(), process_queued_fetch_requests(), process_rel_infos(), process_result(), process_user_defined_encoding_conversions(), process_user_defined_postfix_ops(), process_with_oids_check(), processExtensionTables(), readCommandResponse(), ReadEndOfStreamingResult(), ReceiveXlogStream(), reindex_all_databases(), retrieve_objects(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_simple_query(), RunIdentifySystem(), server_is_in_recovery(), set_frozenxids(), set_replication_progress(), show_binary_results(), sql_exec(), sqlda_common_total_size(), StoreQueryTuple(), storeRow(), test_pipeline_abort(), test_singlerowmode(), test_transaction(), try_complete_step(), vacuum_all_databases(), vacuumlo(), verify_heap_slot_handler(), and wait_for_connection_state().
int PQgssEncInUse | ( | PGconn * | conn | ) |
char * PQhost | ( | const PGconn * | conn | ) |
Definition at line 7422 of file fe-connect.c.
References conn, pg_conn::connhost, pg_conn_host::host, pg_conn_host::hostaddr, and pg_conn::whichhost.
Referenced by do_connect(), exec_command_conninfo(), get_prompt(), libpqrcv_get_senderinfo(), main(), pg_GSS_load_servicename(), and SyncVariables().
char * PQhostaddr | ( | const PGconn * | conn | ) |
Definition at line 7445 of file fe-connect.c.
References conn, pg_conn::connhost, and pg_conn::connip.
Referenced by do_connect(), and exec_command_conninfo().
void PQinitOpenSSL | ( | int | do_ssl, |
int | do_crypto | ||
) |
Definition at line 129 of file fe-secure.c.
void PQinitSSL | ( | int | do_init | ) |
Definition at line 117 of file fe-secure.c.
int PQisBusy | ( | PGconn * | conn | ) |
Definition at line 2031 of file fe-exec.c.
References pg_conn::asyncStatus, conn, CONNECTION_BAD, parseInput(), PGASYNC_BUSY, and pg_conn::status.
Referenced by advanceConnectionState(), confirm_query_canceled_impl(), dblink_is_busy(), libpqrcv_PQgetResult(), libpqsrv_get_result(), pgfdw_get_cleanup_result(), PQconnectPoll(), pqEndcopy3(), process_slot(), test_disallowed_in_pipeline(), test_pipelined_insert(), test_uniqviol(), try_complete_step(), and wait_on_slots().
int PQisnonblocking | ( | const PGconn * | conn | ) |
Definition at line 3983 of file fe-exec.c.
References conn, CONNECTION_BAD, pqIsnonblocking, and pg_conn::status.
Referenced by test_disallowed_in_pipeline(), and test_simple_pipeline().
int PQisthreadsafe | ( | void | ) |
int PQlibVersion | ( | void | ) |
PGresult * PQmakeEmptyPGresult | ( | PGconn * | conn, |
ExecStatusType | status | ||
) |
Definition at line 159 of file fe-exec.c.
References pg_result::attDescs, pg_result::binary, pg_result::client_encoding, pg_conn::client_encoding, pg_result::cmdStatus, conn, pg_result::curBlock, pg_result::curOffset, dupEvents(), pg_result::errFields, pg_result::errMsg, pg_conn::errorMessage, pg_result::errQuery, pg_result::events, pg_conn::events, malloc, pg_result::memorySize, pg_result::nEvents, pg_conn::nEvents, pg_result::noticeHooks, pg_conn::noticeHooks, PGNoticeHooks::noticeProc, PGNoticeHooks::noticeProcArg, PGNoticeHooks::noticeRec, PGNoticeHooks::noticeRecArg, pg_result::ntups, pg_result::null_field, pg_result::numAttributes, pg_result::numParameters, pg_result::paramDescs, PG_SQL_ASCII, PGRES_COMMAND_OK, PGRES_COPY_BOTH, PGRES_COPY_IN, PGRES_COPY_OUT, PGRES_EMPTY_QUERY, PGRES_SINGLE_TUPLE, PGRES_TUPLES_CHUNK, PGRES_TUPLES_OK, PQclear(), pqSetResultError(), pg_result::resultStatus, pg_result::spaceLeft, pg_result::tupArrSize, and pg_result::tuples.
Referenced by ECPGallocate_desc(), getCopyResult(), getCopyStart(), getParamDescriptions(), getRowDescriptions(), PQcopyResult(), pqFunctionCall3(), pqGetErrorNotice3(), pqInternalNotice(), pqParseInput3(), pqPipelineProcessQueue(), and pqPrepareAsyncResult().
int PQmblen | ( | const char * | s, |
int | encoding | ||
) |
Definition at line 1233 of file fe-misc.c.
References encoding, and pg_encoding_mblen().
Referenced by appendStringLiteral(), get_prompt(), pg_wcsformat(), pg_wcssize(), pg_wcswidth(), psqlscan_prepare_buffer(), and strlen_max_width().
int PQmblenBounded | ( | const char * | s, |
int | encoding | ||
) |
Definition at line 1243 of file fe-misc.c.
References encoding, pg_encoding_mblen(), and strnlen().
Referenced by command_no_begin(), dequote_downcase_identifier(), do_field(), patternToSQLRegex(), quote_if_needed(), reportErrorPosition(), skip_white_space(), splitTableColumnsSpec(), strip_quotes(), and strtokx().
int PQnfields | ( | const PGresult * | res | ) |
Definition at line 3489 of file fe-exec.c.
References pg_result::numAttributes.
Referenced by BaseBackup(), CreateReplicationSlot(), DescribeQuery(), DropReplicationSlot(), dumpTableData_insert(), ecpg_build_compat_sqlda(), ecpg_build_native_sqlda(), ecpg_process_output(), ECPGget_desc(), ECPGget_desc_header(), ExecQueryTuples(), GetSlotInformation(), indexOfColumn(), libpq_traverse_files(), libpqrcv_endstreaming(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), main(), make_tuple_from_result_row(), materializeResult(), postgresAnalyzeForeignTable(), postgresGetAnalyzeInfoForForeignTable(), PQdisplayTuples(), PQencryptPasswordConn(), PQprint(), PQprintTuples(), printQuery(), PrintResultInCrosstab(), process_queued_fetch_requests(), readCommandResponse(), ReadEndOfStreamingResult(), ReceiveXlogStream(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_simple_query(), RunIdentifySystem(), sql_exec(), sqlda_common_total_size(), sqlda_compat_empty_size(), sqlda_native_empty_size(), StoreQueryTuple(), storeRow(), test_prepared(), and wait_for_connection_state().
Definition at line 2667 of file fe-exec.c.
References conn, pgNotify::next, pg_conn::notifyHead, pg_conn::notifyTail, and parseInput().
Referenced by dblink_get_notify(), ecpg_process_output(), main(), PrintNotifications(), and try_complete_step().
int PQnparams | ( | const PGresult * | res | ) |
Definition at line 3915 of file fe-exec.c.
References pg_result::numParameters.
int PQntuples | ( | const PGresult * | res | ) |
Definition at line 3481 of file fe-exec.c.
References pg_result::ntups.
Referenced by add_tablespace_footer(), addFooterToPublicationDesc(), append_depends_on_extension(), appendQualifiedRelation(), BaseBackup(), buildMatViewRefreshDependencies(), check_and_drop_existing_subscriptions(), check_and_drop_publications(), check_for_connection_status(), check_for_pg_role_prefix(), check_for_prepared_transactions(), check_is_install_user(), check_new_cluster_logical_replication_slots(), check_new_cluster_subscription_configuration(), check_old_cluster_subscription_state(), cluster_all_databases(), collectBinaryUpgradeClassOids(), collectComments(), collectRoleNames(), collectSecLabels(), collectSequences(), compile_database_list(), compile_relation_list_one_db(), create_publication(), CreateReplicationSlot(), createViewAsClause(), describeOneTableDetails(), describePublications(), describeRoles(), describeTableDetails(), drop_failover_replication_slots(), dropDBs(), DropReplicationSlot(), dropRoles(), dropTablespaces(), dumpCompositeType(), dumpCompositeTypeColComments(), dumpDatabase(), dumpDatabaseConfig(), dumpDatabases(), dumpEnumType(), dumpOpclass(), dumpOpfamily(), dumpRelationStats(), dumpRoleGUCPrivs(), dumpRoleMembership(), dumpRoles(), dumpRule(), dumpSequence(), dumpSequenceData(), dumpTable(), dumpTableData_insert(), dumpTablespaces(), dumpTSConfig(), dumpUserConfig(), dumpUserMappings(), ecpg_is_type_an_array(), ecpg_process_output(), ecpg_store_result(), ECPGget_desc(), emitShSecLabels(), ExecQueryAndProcessResults(), ExecQueryTuples(), execute_dml_stmt(), execute_foreign_modify(), ExecuteSqlQueryForSingleRow(), expand_dbname_patterns(), expand_extension_name_patterns(), expand_foreign_server_name_patterns(), expand_schema_name_patterns(), expand_table_name_patterns(), fetch_more_data(), generate_object_name(), get_create_object_cmd(), get_db_infos(), get_loadable_libraries(), get_parallel_tabidx_list(), get_parallel_tables_list(), get_primary_sysid(), get_tablespace_paths(), get_template0_info(), getAccessMethods(), getAdditionalACLs(), getAggregates(), getCasts(), getCollations(), getConstraints(), getConversions(), getDefaultACLs(), getDependencies(), getDomainConstraints(), getEventTriggers(), getExtendedStatistics(), getExtensionMembership(), getExtensions(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getIndexes(), getInherits(), getLOs(), getNamespaces(), getOpclasses(), getOperators(), getOpfamilies(), getPartitioningInfo(), getPolicies(), getProcLangs(), getPublicationNamespaces(), getPublications(), getPublicationTables(), getRules(), GetSlotInformation(), getSubscriptions(), getSubscriptionTables(), getTableAttrs(), GetTableInfo(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), libpq_fetch_file(), libpq_traverse_files(), libpqrcv_endstreaming(), libpqrcv_identify_system(), libpqrcv_processTuples(), libpqrcv_readtimelinehistoryfile(), listDbRoleSettings(), listExtensionContents(), listSchemas(), listTables(), listTSConfigsVerbose(), listTSParsersVerbose(), lo_initialize(), lookup_object_oid(), main(), make_tuple_from_result_row(), materializeResult(), old_9_6_invalidate_hash_indexes(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), PQconnectPoll(), PQdisplayTuples(), PQencryptPasswordConn(), PQprint(), PQprintTuples(), printCrosstab(), printQuery(), PrintResultInCrosstab(), process_data_type_check(), process_extension_updates(), process_incompat_polymorphics(), process_isn_and_int8_passing_mismatch(), process_loadable_libraries(), process_old_cluster_logical_slot_infos(), process_old_sub_state_check(), process_queued_fetch_requests(), process_rel_infos(), process_user_defined_encoding_conversions(), process_user_defined_postfix_ops(), process_with_oids_check(), processExtensionTables(), readCommandResponse(), ReadEndOfStreamingResult(), ReceiveXlogStream(), reindex_all_databases(), retrieve_objects(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_simple_query(), RunIdentifySystem(), set_frozenxids(), set_replication_progress(), show_binary_results(), sql_exec(), StoreQueryTuple(), storeRow(), test_pipeline_abort(), test_singlerowmode(), test_transaction(), try_complete_step(), vacuum_all_databases(), vacuumlo(), verify_btree_slot_handler(), verify_heap_slot_handler(), and wait_for_connection_state().
char * PQoidStatus | ( | const PGresult * | res | ) |
Definition at line 3765 of file fe-exec.c.
References buf, pg_result::cmdStatus, and len.
Definition at line 3793 of file fe-exec.c.
References pg_result::cmdStatus, and InvalidOid.
Referenced by ecpg_process_output(), and PrintQueryStatus().
char * PQoptions | ( | const PGconn * | conn | ) |
Definition at line 7482 of file fe-connect.c.
References conn, and pg_conn::pgoptions.
Referenced by exec_command_conninfo().
const char * PQparameterStatus | ( | const PGconn * | conn, |
const char * | paramName | ||
) |
Definition at line 7508 of file fe-connect.c.
References conn, pgParameterStatus::name, pgParameterStatus::next, pg_conn::pstatus, and pgParameterStatus::value.
Referenced by _check_database_version(), applyRemoteGucs(), BaseBackup(), CheckServerVersionForStreaming(), connectDatabase(), connection_warnings(), ecpg_build_params(), exec_command_conninfo(), GetConnection(), is_superuser(), main(), printVersion(), session_username(), setup_connection(), standard_strings(), and SyncVariables().
Definition at line 3926 of file fe-exec.c.
References check_param_number(), InvalidOid, pg_result::paramDescs, and pgresParamDesc::typid.
char * PQpass | ( | const PGconn * | conn | ) |
Definition at line 7405 of file fe-connect.c.
References conn, pg_conn::connhost, password, pg_conn_host::password, pg_conn::pgpass, and pg_conn::whichhost.
Referenced by ConnectDatabase(), and PQconnectionNeedsPassword().
PGPing PQping | ( | const char * | conninfo | ) |
Definition at line 808 of file fe-connect.c.
References conn, internal_ping(), PQconnectStart(), and PQfinish().
PGPing PQpingParams | ( | const char *const * | keywords, |
const char *const * | values, | ||
int | expand_dbname | ||
) |
Definition at line 755 of file fe-connect.c.
References conn, internal_ping(), keywords, PQconnectStartParams(), PQfinish(), and values.
Referenced by main(), and regression_main().
PGpipelineStatus PQpipelineStatus | ( | const PGconn * | conn | ) |
Definition at line 7597 of file fe-connect.c.
References conn, pg_conn::pipelineStatus, and PQ_PIPELINE_OFF.
Referenced by advanceConnectionState(), exec_command_g(), exec_command_gexec(), exec_command_gset(), exec_command_sendpipeline(), exec_command_watch(), ExecQueryAndProcessResults(), executeMetaCommand(), get_prompt(), test_disallowed_in_pipeline(), test_multi_pipelines(), test_pipeline_abort(), and test_simple_pipeline().
int PQpipelineSync | ( | PGconn * | conn | ) |
Definition at line 3272 of file fe-exec.c.
References conn, and pqPipelineSyncInternal().
Referenced by discardUntilSync(), ExecQueryAndProcessResults(), executeMetaCommand(), test_multi_pipelines(), test_pipeline_abort(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), and test_transaction().
char * PQport | ( | const PGconn * | conn | ) |
Definition at line 7458 of file fe-connect.c.
References conn, pg_conn::connhost, pg_conn_host::port, and pg_conn::whichhost.
Referenced by do_connect(), exec_command_conninfo(), get_prompt(), libpqrcv_get_senderinfo(), main(), and SyncVariables().
PGresult * PQprepare | ( | PGconn * | conn, |
const char * | stmtName, | ||
const char * | query, | ||
int | nParams, | ||
const Oid * | paramTypes | ||
) |
Definition at line 2306 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendPrepare().
Referenced by DescribeQuery(), init_libpq_conn(), main(), prepare_common(), prepareCommand(), and test_uniqviol().
void PQprint | ( | FILE * | fout, |
const PGresult * | res, | ||
const PQprintOpt * | po | ||
) |
Definition at line 68 of file fe-print.c.
References _PQprintOpt::align, calloc, _PQprintOpt::caption, do_field(), do_header(), _PQprintOpt::expanded, _PQprintOpt::fieldName, _PQprintOpt::fieldSep, fprintf, free, _PQprintOpt::header, _PQprintOpt::html3, i, j, len, libpq_gettext, output_row(), _PQprintOpt::pager, pq_block_sigpipe(), pq_reset_sigpipe(), PQfname(), PQnfields(), PQntuples(), _PQprintOpt::standard, generate_unaccent_rules::stdout, and _PQprintOpt::tableOpt.
Referenced by printResultSet().
void PQprintTuples | ( | const PGresult * | res, |
FILE * | fout, | ||
int | PrintAttNames, | ||
int | TerseOutput, | ||
int | colWidth | ||
) |
Definition at line 671 of file fe-print.c.
References fprintf, free, i, j, libpq_gettext, malloc, PQfname(), PQgetvalue(), PQnfields(), PQntuples(), and sprintf.
int PQprotocolVersion | ( | const PGconn * | conn | ) |
Definition at line 7523 of file fe-connect.c.
References conn, CONNECTION_BAD, PG_PROTOCOL_MAJOR, pg_conn::pversion, and pg_conn::status.
Referenced by exec_command_conninfo(), and handleCopyIn().
int PQputCopyData | ( | PGconn * | conn, |
const char * | buffer, | ||
int | nbytes | ||
) |
Definition at line 2695 of file fe-exec.c.
References pg_conn::asyncStatus, conn, libpq_append_conn_error(), pg_conn::outBufSize, pg_conn::outCount, parseInput(), PGASYNC_COPY_BOTH, PGASYNC_COPY_IN, pqCheckOutBufferSpace(), pqFlush(), pqIsnonblocking, PqMsg_CopyData, pqPutMsgEnd(), pqPutMsgStart(), and pqPutnchar().
Referenced by BaseBackup(), ExecuteSqlCommandBuf(), handleCopyIn(), libpqrcv_send(), PQputnbytes(), and sendFeedback().
int PQputCopyEnd | ( | PGconn * | conn, |
const char * | errormsg | ||
) |
Definition at line 2749 of file fe-exec.c.
References pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, libpq_append_conn_error(), PGASYNC_BUSY, PGASYNC_COPY_BOTH, PGASYNC_COPY_IN, PGASYNC_COPY_OUT, PGQUERY_SIMPLE, pqFlush(), PqMsg_CopyDone, PqMsg_CopyFail, PqMsg_Sync, pqPutMsgEnd(), pqPutMsgStart(), pqPuts(), and PGcmdQueueEntry::queryclass.
Referenced by BaseBackup(), CheckCopyStreamStop(), EndDBCopyMode(), handleCopyIn(), HandleEndOfCopyStream(), libpqrcv_endstreaming(), PQexecStart(), prepareToTerminate(), and ProcessXLogDataMsg().
int PQputline | ( | PGconn * | conn, |
const char * | string | ||
) |
Definition at line 2918 of file fe-exec.c.
References conn, and PQputnbytes().
Referenced by initPopulateTable().
int PQputnbytes | ( | PGconn * | conn, |
const char * | buffer, | ||
int | nbytes | ||
) |
Definition at line 2928 of file fe-exec.c.
References conn, and PQputCopyData().
Referenced by PQputline().
pgthreadlock_t PQregisterThreadLock | ( | pgthreadlock_t | newhandler | ) |
Definition at line 8179 of file fe-connect.c.
References default_threadlock(), and pg_g_threadlock.
int PQrequestCancel | ( | PGconn * | conn | ) |
Definition at line 661 of file fe-cancel.c.
References conn, PQExpBufferData::data, pg_conn::errorMessage, pg_conn::errorReported, PQExpBufferData::len, PQExpBufferData::maxlen, PGINVALID_SOCKET, PQcancel(), PQfreeCancel(), PQgetCancel(), pg_conn::sock, and strlcpy().
Referenced by test_cancel().
void PQreset | ( | PGconn * | conn | ) |
Definition at line 5238 of file fe-connect.c.
References conn, PGEventConnReset::conn, pg_conn::events, i, pg_conn::nEvents, PGEvent::passThrough, PGEVT_CONNRESET, pqClosePGconn(), pqConnectDBComplete(), pqConnectDBStart(), and PGEvent::proc.
Referenced by CheckConnection().
PostgresPollingStatusType PQresetPoll | ( | PGconn * | conn | ) |
Definition at line 5290 of file fe-connect.c.
References conn, PGEventConnReset::conn, pg_conn::events, i, pg_conn::nEvents, PGEvent::passThrough, PGEVT_CONNRESET, PGRES_POLLING_FAILED, PGRES_POLLING_OK, PQconnectPoll(), and PGEvent::proc.
int PQresetStart | ( | PGconn * | conn | ) |
Definition at line 5271 of file fe-connect.c.
References conn, pqClosePGconn(), and pqConnectDBStart().
char * PQresStatus | ( | ExecStatusType | status | ) |
Definition at line 3419 of file fe-exec.c.
References lengthof, libpq_gettext, and pgresStatus.
Referenced by BaseBackup(), process_result(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), and try_complete_step().
void * PQresultAlloc | ( | PGresult * | res, |
size_t | nBytes | ||
) |
Definition at line 543 of file fe-exec.c.
References OOM_result, and pqResultAlloc().
Referenced by PQsetResultAttrs().
char * PQresultErrorField | ( | const PGresult * | res, |
int | fieldcode | ||
) |
Definition at line 3466 of file fe-exec.c.
References pgMessageField::code, pgMessageField::contents, pg_result::errFields, and pgMessageField::next.
Referenced by BaseBackup(), confirm_query_canceled_impl(), CreateReplicationSlot(), dblink_res_error(), ecpg_raise_backend(), ECPGnoticeReceiver(), GetTableInfo(), libpqrcv_exec(), minimal_error_message(), pgfdw_report_error(), pgpassfileWarning(), pqBuildErrorMessage3(), PQconnectPoll(), readCommandResponse(), SetResultVariables(), should_processing_continue(), TableCommandResultHandler(), test_pipeline_abort(), and try_complete_step().
char * PQresultErrorMessage | ( | const PGresult * | res | ) |
Definition at line 3427 of file fe-exec.c.
References pg_result::errMsg.
Referenced by check_and_drop_existing_subscriptions(), check_and_drop_publications(), check_publisher(), check_subscriber(), connect_database(), create_logical_replication_slot(), create_publication(), create_subscription(), defaultNoticeReceiver(), drop_existing_subscriptions(), drop_failover_replication_slots(), drop_publication(), drop_replication_slot(), ecpg_check_PQresult(), ecpg_process_output(), enable_subscription(), ExecQueryAndProcessResults(), generate_object_name(), get_primary_sysid(), init_libpq_conn(), libpq_fetch_file(), libpq_traverse_files(), process_queued_fetch_requests(), ReceiveXlogStream(), run_simple_command(), run_simple_query(), server_is_in_recovery(), set_replication_progress(), setup_publisher(), StreamLogicalLog(), test_pipeline_abort(), and try_complete_step().
size_t PQresultMemorySize | ( | const PGresult * | res | ) |
Definition at line 663 of file fe-exec.c.
References pg_result::memorySize.
ExecStatusType PQresultStatus | ( | const PGresult * | res | ) |
Definition at line 3411 of file fe-exec.c.
References PGRES_FATAL_ERROR, and pg_result::resultStatus.
Referenced by _doSetSessionAuth(), _printTableAccessMethodNoStorage(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), AcceptResult(), advanceConnectionState(), BaseBackup(), check_and_drop_existing_subscriptions(), check_and_drop_publications(), check_loadable_libraries(), check_prepare_conn(), check_publisher(), check_subscriber(), ClearOrSaveResult(), close_cursor(), compile_database_list(), compile_relation_list_one_db(), confirm_query_canceled_impl(), connect_database(), create_cursor(), create_logical_replication_slot(), create_publication(), create_subscription(), CreateReplicationSlot(), dblink_close(), dblink_exec(), dblink_fetch(), dblink_open(), dblink_record_internal(), deallocate_query(), DescribeQuery(), discardAbortedPipelineResults(), discardUntilSync(), do_sql_command_end(), drop_existing_subscriptions(), drop_failover_replication_slots(), drop_publication(), drop_replication_slot(), DropReplicationSlot(), dumpTableData_copy(), ecpg_check_PQresult(), ecpg_is_type_an_array(), ecpg_process_output(), enable_subscription(), EndDBCopyMode(), exec_command_password(), ExecQueryAndProcessResults(), execute_dml_stmt(), execute_foreign_modify(), executeCommand(), executeMaintenanceCommand(), executeQuery(), executeQueryOrDie(), ExecuteSqlCommand(), ExecuteSqlQuery(), ExecuteSqlStatement(), executeStatement(), fetch_more_data(), generate_object_name(), get_create_object_cmd(), get_primary_sysid(), get_remote_estimate(), get_table_relkind(), GetConnection(), GetSlotInformation(), GetTableInfo(), handleCopyIn(), handleCopyOut(), HandleCopyResult(), HandleEndOfCopyStream(), init_libpq_conn(), initPopulateTable(), libpq_fetch_file(), libpq_traverse_files(), libpqrcv_alter_slot(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_identify_system(), libpqrcv_PQexec(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_startstreaming(), libpqsrv_get_result_last(), lo_close(), lo_creat(), lo_create(), lo_lseek(), lo_lseek64(), lo_open(), lo_read(), lo_tell(), lo_tell64(), lo_truncate(), lo_truncate64(), lo_unlink(), lo_write(), lockTableForWorker(), lookup_object_oid(), main(), materializeResult(), pgfdw_exec_cleanup_query_end(), postgresAcquireSampleRowsFunc(), postgresAnalyzeForeignTable(), postgresGetAnalyzeInfoForForeignTable(), postgresImportForeignSchema(), postgresReScanForeignScan(), PQconnectPoll(), PQencryptPasswordConn(), prepare_foreign_modify(), prepareCommand(), PrintQueryResult(), PrintQueryStatus(), PrintResultInCrosstab(), process_query_result(), process_queued_fetch_requests(), process_result(), readCommandResponse(), ReceiveCopyData(), ReceiveXlogStream(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_permutation(), run_simple_command(), run_simple_query(), RunIdentifySystem(), SendQuery(), server_is_in_recovery(), set_replication_progress(), setup_publisher(), should_processing_continue(), sql_conn(), sql_exec(), storeQueryResult(), StreamLogicalLog(), TableCommandResultHandler(), test_disallowed_in_pipeline(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), test_transaction(), test_uniqviol(), try_complete_step(), tryExecuteStatement(), vacuumlo(), verify_btree_slot_handler(), verify_heap_slot_handler(), and wait_for_connection_state().
char * PQresultVerboseErrorMessage | ( | const PGresult * | res, |
PGVerbosity | verbosity, | ||
PGContextVisibility | show_context | ||
) |
Definition at line 3435 of file fe-exec.c.
References PQExpBufferData::data, initPQExpBuffer(), libpq_gettext, PGRES_FATAL_ERROR, PGRES_NONFATAL_ERROR, pqBuildErrorMessage3(), PQExpBufferDataBroken, pg_result::resultStatus, and termPQExpBuffer().
Referenced by exec_command_errverbose().
int PQsendClosePortal | ( | PGconn * | conn, |
const char * | portal | ||
) |
Definition at line 2569 of file fe-exec.c.
References conn, PqMsg_Close, and PQsendTypedCommand().
Referenced by test_prepared().
int PQsendClosePrepared | ( | PGconn * | conn, |
const char * | stmt | ||
) |
Definition at line 2556 of file fe-exec.c.
References conn, PqMsg_Close, PQsendTypedCommand(), and stmt.
Referenced by ExecQueryAndProcessResults(), and test_prepared().
int PQsendDescribePortal | ( | PGconn * | conn, |
const char * | portal | ||
) |
Definition at line 2504 of file fe-exec.c.
References conn, PqMsg_Describe, and PQsendTypedCommand().
Referenced by test_prepared().
int PQsendDescribePrepared | ( | PGconn * | conn, |
const char * | stmt | ||
) |
Definition at line 2491 of file fe-exec.c.
References conn, PqMsg_Describe, PQsendTypedCommand(), and stmt.
Referenced by test_prepared().
int PQsendFlushRequest | ( | PGconn * | conn | ) |
Definition at line 3371 of file fe-exec.c.
References pg_conn::asyncStatus, conn, CONNECTION_OK, libpq_append_conn_error(), PGASYNC_IDLE, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, PqMsg_Flush, pqPipelineFlush(), pqPutMsgEnd(), pqPutMsgStart(), and pg_conn::status.
Referenced by ExecQueryAndProcessResults(), test_nosync(), test_pipeline_idle(), test_singlerowmode(), and test_uniqviol().
int PQsendPipelineSync | ( | PGconn * | conn | ) |
Definition at line 3282 of file fe-exec.c.
References conn, and pqPipelineSyncInternal().
Referenced by ExecQueryAndProcessResults(), executeMetaCommand(), and test_multi_pipelines().
int PQsendPrepare | ( | PGconn * | conn, |
const char * | stmtName, | ||
const char * | query, | ||
int | nParams, | ||
const Oid * | paramTypes | ||
) |
Definition at line 1536 of file fe-exec.c.
References conn, i, libpq_append_conn_error(), PGQUERY_PREPARE, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, PQ_QUERY_PARAM_MAX_LIMIT, pqAllocCmdQueueEntry(), pqAppendCmdQueueEntry(), PqMsg_Parse, PqMsg_Sync, pqPipelineFlush(), pqPutInt(), pqPutMsgEnd(), pqPutMsgStart(), pqPuts(), pqRecycleCmdQueueEntry(), PQsendQueryStart(), PGcmdQueueEntry::query, and PGcmdQueueEntry::queryclass.
Referenced by ExecQueryAndProcessResults(), PQprepare(), prepare_foreign_modify(), test_pipelined_insert(), test_prepared(), and test_transaction().
int PQsendQuery | ( | PGconn * | conn, |
const char * | query | ||
) |
Definition at line 1416 of file fe-exec.c.
References conn, and PQsendQueryInternal().
Referenced by advanceConnectionState(), BaseBackup(), dblink_send_query(), do_sql_command_begin(), ExecQueryAndProcessResults(), fetch_more_data_begin(), libpqrcv_PQexec(), libpqsrv_exec(), pgfdw_exec_cleanup_query_begin(), pgfdw_exec_query(), pgfdw_finish_pre_commit_cleanup(), PQexec(), process_slot(), run_command(), run_permutation(), run_reindex_command(), run_vacuum_command(), sendCommand(), storeQueryResult(), and test_disallowed_in_pipeline().
int PQsendQueryParams | ( | PGconn * | conn, |
const char * | command, | ||
int | nParams, | ||
const Oid * | paramTypes, | ||
const char *const * | paramValues, | ||
const int * | paramLengths, | ||
const int * | paramFormats, | ||
int | resultFormat | ||
) |
Definition at line 1492 of file fe-exec.c.
References conn, libpq_append_conn_error(), PQ_QUERY_PARAM_MAX_LIMIT, PQsendQueryGuts(), and PQsendQueryStart().
Referenced by create_cursor(), ExecQueryAndProcessResults(), execute_dml_stmt(), libpqsrv_exec_params(), PQexecParams(), send_cancellable_query_impl(), sendCommand(), test_multi_pipelines(), test_nosync(), test_pipeline_abort(), test_pipeline_idle(), test_pipelined_insert(), test_simple_pipeline(), test_singlerowmode(), and test_transaction().
int PQsendQueryPrepared | ( | PGconn * | conn, |
const char * | stmtName, | ||
int | nParams, | ||
const char *const * | paramValues, | ||
const int * | paramLengths, | ||
const int * | paramFormats, | ||
int | resultFormat | ||
) |
Definition at line 1633 of file fe-exec.c.
References conn, libpq_append_conn_error(), PQ_QUERY_PARAM_MAX_LIMIT, PQsendQueryGuts(), and PQsendQueryStart().
Referenced by ExecQueryAndProcessResults(), execute_foreign_modify(), PQexecPrepared(), process_queued_fetch_requests(), sendCommand(), test_pipelined_insert(), test_transaction(), and test_uniqviol().
int PQserverVersion | ( | const PGconn * | conn | ) |
Definition at line 7543 of file fe-connect.c.
References conn, CONNECTION_BAD, pg_conn::status, and pg_conn::sversion.
Referenced by _check_database_version(), appendStringLiteralConn(), BaseBackup(), CheckServerVersionForStreaming(), configure_remote_session(), connectDatabase(), CreateReplicationSlot(), dumpRoleMembership(), GenerateRecoveryConfig(), GetConnection(), initPopulateTable(), libpqrcv_create_slot(), libpqrcv_server_version(), libpqrcv_startstreaming(), main(), postgresAcquireSampleRowsFunc(), postgresImportForeignSchema(), postgresReScanForeignScan(), printVersion(), processSQLNamePattern(), ReceiveTarFile(), reindex_one_database(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), RunIdentifySystem(), StartLogStreamer(), StreamLog(), SyncVariables(), vacuum_one_database(), vacuumlo(), and WriteRecoveryConfig().
char * PQservice | ( | const PGconn * | conn | ) |
Definition at line 7389 of file fe-connect.c.
References conn, and pg_conn::pgservice.
Referenced by get_prompt(), and SyncVariables().
void PQsetAuthDataHook | ( | PQauthDataHook_type | hook | ) |
Definition at line 1595 of file fe-auth.c.
References PQauthDataHook, and PQdefaultAuthDataHook().
Referenced by main().
int PQsetChunkedRowsMode | ( | PGconn * | conn, |
int | chunkSize | ||
) |
Definition at line 1965 of file fe-exec.c.
References canChangeResultMode(), conn, pg_conn::maxChunkSize, pg_conn::partialResMode, and pg_conn::singleRowMode.
Referenced by ExecQueryAndProcessResults(), and test_singlerowmode().
int PQsetClientEncoding | ( | PGconn * | conn, |
const char * | encoding | ||
) |
Definition at line 7651 of file fe-connect.c.
References conn, CONNECTION_OK, encoding, pg_encoding_to_char, pg_get_encoding_from_locale(), PGRES_COMMAND_OK, PQclear(), PQexec(), pg_result::resultStatus, sprintf, and pg_conn::status.
Referenced by dblink_connect(), dblink_get_conn(), exec_command_encoding(), main(), setup_connection(), and test_one_vector().
PGconn * PQsetdbLogin | ( | const char * | pghost, |
const char * | pgport, | ||
const char * | pgoptions, | ||
const char * | pgtty, | ||
const char * | dbName, | ||
const char * | login, | ||
const char * | pwd | ||
) |
Definition at line 2165 of file fe-connect.c.
References conn, CONNECTION_BAD, connectOptions1(), dbName, pg_conn::dbName, free, libpq_append_conn_error(), pghost, pg_conn::pghost, pg_conn::pgoptions, pg_conn::pgpass, pgport, pg_conn::pgport, pg_conn::pguser, pqConnectDBComplete(), pqConnectDBStart(), pqConnectOptions2(), pqMakeEmptyPGconn(), recognized_connection_string(), and pg_conn::status.
PGContextVisibility PQsetErrorContextVisibility | ( | PGconn * | conn, |
PGContextVisibility | show_context | ||
) |
Definition at line 7705 of file fe-connect.c.
References conn, PQSHOW_CONTEXT_ERRORS, and pg_conn::show_context.
Referenced by show_context_hook(), and SyncVariables().
PGVerbosity PQsetErrorVerbosity | ( | PGconn * | conn, |
PGVerbosity | verbosity | ||
) |
Definition at line 7693 of file fe-connect.c.
References conn, PQERRORS_DEFAULT, and pg_conn::verbosity.
Referenced by main(), SyncVariables(), and verbosity_hook().
int PQsetnonblocking | ( | PGconn * | conn, |
int | arg | ||
) |
Definition at line 3944 of file fe-exec.c.
References arg, pg_conn::cmd_queue_head, conn, CONNECTION_BAD, pg_conn::nonblocking, pqClearConnErrorState, pqFlush(), pg_conn::status, and true.
Referenced by test_cancel(), test_pipelined_insert(), and test_uniqviol().
PQnoticeProcessor PQsetNoticeProcessor | ( | PGconn * | conn, |
PQnoticeProcessor | proc, | ||
void * | arg | ||
) |
Definition at line 7734 of file fe-connect.c.
References arg, conn, pg_conn::noticeHooks, PGNoticeHooks::noticeProc, and PGNoticeHooks::noticeProcArg.
Referenced by ConnectDatabase(), do_connect(), main(), and test_pipeline_idle().
PQnoticeReceiver PQsetNoticeReceiver | ( | PGconn * | conn, |
PQnoticeReceiver | proc, | ||
void * | arg | ||
) |
Definition at line 7717 of file fe-connect.c.
References arg, conn, pg_conn::noticeHooks, PGNoticeHooks::noticeRec, and PGNoticeHooks::noticeRecArg.
Referenced by ECPGconnect().
int PQsetResultAttrs | ( | PGresult * | res, |
int | numAttributes, | ||
PGresAttDesc * | attDescs | ||
) |
Definition at line 249 of file fe-exec.c.
References pg_result::attDescs, pg_result::binary, pgresAttDesc::format, i, pgresAttDesc::name, pg_result::null_field, pg_result::numAttributes, OOM_result, PQresultAlloc(), and pqResultStrdup().
Referenced by PQcopyResult().
int PQsetSingleRowMode | ( | PGconn * | conn | ) |
Definition at line 1948 of file fe-exec.c.
References canChangeResultMode(), conn, pg_conn::maxChunkSize, pg_conn::partialResMode, and pg_conn::singleRowMode.
Referenced by process_queued_fetch_requests(), storeQueryResult(), test_pipeline_abort(), and test_singlerowmode().
void PQsetSSLKeyPassHook_OpenSSL | ( | PQsslKeyPassHook_OpenSSL_type | hook | ) |
Definition at line 1866 of file fe-secure-openssl.c.
References PQsslKeyPassHook.
void PQsetTraceFlags | ( | PGconn * | conn, |
int | flags | ||
) |
Definition at line 64 of file fe-trace.c.
References conn, pg_conn::Pfdebug, and pg_conn::traceFlags.
Referenced by main().
int PQsetvalue | ( | PGresult * | res, |
int | tup_num, | ||
int | field_num, | ||
char * | value, | ||
int | len | ||
) |
Definition at line 452 of file fe-exec.c.
References check_field_number(), errmsg(), i, pgresAttValue::len, len, libpq_gettext, pg_result::noticeHooks, pg_result::ntups, pg_result::null_field, NULL_LEN, pg_result::numAttributes, OOM_result, pqAddTuple(), pqInternalNotice(), pqResultAlloc(), pg_result::tuples, value, and pgresAttValue::value.
Referenced by PQcopyResult().
int PQsocket | ( | const PGconn * | conn | ) |
Definition at line 7579 of file fe-connect.c.
References pg_conn::altsock, conn, PGINVALID_SOCKET, and pg_conn::sock.
Referenced by connect_slot(), CopyStreamPoll(), libpqrcv_connect(), libpqrcv_PQgetResult(), libpqrcv_receive(), libpqsrv_connect_internal(), libpqsrv_get_result(), main(), pgfdw_conn_check(), pgfdw_get_cleanup_result(), postgresForeignAsyncConfigureWait(), PQcancelSocket(), StreamLogicalLog(), test_nosync(), test_pipelined_insert(), test_uniqviol(), threadRun(), try_complete_step(), wait_on_slots(), and wait_until_connected().
int PQsocketPoll | ( | int | sock, |
int | forRead, | ||
int | forWrite, | ||
pg_usec_time_t | end_time | ||
) |
Definition at line 1115 of file fe-misc.c.
References end_time, now(), PQgetCurrentTimeUSec(), and select.
Referenced by pqSocketCheck(), timer_expired(), and wait_until_connected().
const char * PQsslAttribute | ( | PGconn * | conn, |
const char * | attribute_name | ||
) |
Definition at line 1609 of file fe-secure-openssl.c.
References conn, data, len, and snprintf.
Referenced by exec_command_conninfo(), print_ssl_library(), and printSSLInfo().
const char *const * PQsslAttributeNames | ( | PGconn * | conn | ) |
Definition at line 1582 of file fe-secure-openssl.c.
References conn.
int PQsslInUse | ( | PGconn * | conn | ) |
Definition at line 103 of file fe-secure.c.
References conn, and pg_conn::ssl_in_use.
Referenced by exec_command_conninfo(), and printSSLInfo().
void * PQsslStruct | ( | PGconn * | conn, |
const char * | struct_name | ||
) |
Definition at line 1572 of file fe-secure-openssl.c.
References conn.
ConnStatusType PQstatus | ( | const PGconn * | conn | ) |
Definition at line 7490 of file fe-connect.c.
References conn, CONNECTION_BAD, and pg_conn::status.
Referenced by check_prepare_conn(), connect_database(), connect_pg_server(), ConnectDatabase(), connectDatabase(), ConnectionUp(), connectToServer(), copy_connection(), dblink_connect(), dblink_get_conn(), do_connect(), doConnect(), ecpg_raise_backend(), ECPGconnect(), GetConnection(), getTransactionStatus(), libpqrcv_connect(), libpqrcv_PQexec(), libpqrcv_receive(), libpqsrv_connect_internal(), libpqsrv_get_result_last(), main(), pgfdw_conn_check(), pgfdw_finish_pre_commit_cleanup(), pgfdw_reset_xact_state(), PQcancelStatus(), process_query_result(), sql_conn(), start_postmaster(), test_cancel(), and vacuumlo().
void PQtrace | ( | PGconn * | conn, |
FILE * | debug_port | ||
) |
Definition at line 35 of file fe-trace.c.
References conn, pg_conn::Pfdebug, PQuntrace(), and pg_conn::traceFlags.
Referenced by main().
PGTransactionStatusType PQtransactionStatus | ( | const PGconn * | conn | ) |
Definition at line 7498 of file fe-connect.c.
References pg_conn::asyncStatus, conn, CONNECTION_OK, PGASYNC_IDLE, PQTRANS_ACTIVE, PQTRANS_UNKNOWN, pg_conn::status, and pg_conn::xactStatus.
Referenced by dblink_open(), DisconnectDatabase(), disconnectDatabase(), ecpg_autostart_transaction(), ECPGsetcommit(), ECPGtrans(), ECPGtransactionStatus(), get_prompt(), getTransactionStatus(), pgfdw_abort_cleanup(), pgfdw_abort_cleanup_begin(), pgfdw_reset_xact_state(), SendQuery(), start_lo_xact(), and vacuumlo().
char * PQtty | ( | const PGconn * | conn | ) |
Definition at line 7474 of file fe-connect.c.
References conn.
unsigned char * PQunescapeBytea | ( | const unsigned char * | strtext, |
size_t * | retbuflen | ||
) |
Definition at line 4553 of file fe-exec.c.
References free, get_hex(), i, ISFIRSTOCTDIGIT, ISOCTDIGIT, j, malloc, OCTVAL, realloc, and tmpbuf.
void PQuntrace | ( | PGconn * | conn | ) |
Definition at line 49 of file fe-trace.c.
References conn, pg_conn::Pfdebug, and pg_conn::traceFlags.
Referenced by PQtrace().
char * PQuser | ( | const PGconn * | conn | ) |
Definition at line 7397 of file fe-connect.c.
References conn, and pg_conn::pguser.
Referenced by do_connect(), exec_command_conninfo(), get_prompt(), main(), session_username(), and SyncVariables().