PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <ctype.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
#include "libpq-fe.h"
#include "libpq-int.h"
#include "mb/pg_wchar.h"
Go to the source code of this file.
Macros | |
#define | PGRESULT_DATA_BLOCKSIZE 2048 |
#define | PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */ |
#define | PGRESULT_BLOCK_OVERHEAD Max(sizeof(PGresult_data), PGRESULT_ALIGN_BOUNDARY) |
#define | PGRESULT_SEP_ALLOC_THRESHOLD (PGRESULT_DATA_BLOCKSIZE / 2) |
#define | ISFIRSTOCTDIGIT(CH) ((CH) >= '0' && (CH) <= '3') |
#define | ISOCTDIGIT(CH) ((CH) >= '0' && (CH) <= '7') |
#define | OCTVAL(CH) ((CH) - '0') |
Functions | |
static PGEvent * | dupEvents (PGEvent *events, int count, size_t *memSize) |
static bool | pqAddTuple (PGresult *res, PGresAttValue *tup, const char **errmsgp) |
static int | PQsendQueryInternal (PGconn *conn, const char *query, bool newQuery) |
static bool | PQsendQueryStart (PGconn *conn, bool newQuery) |
static int | PQsendQueryGuts (PGconn *conn, const char *command, const char *stmtName, int nParams, const Oid *paramTypes, const char *const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat) |
static void | parseInput (PGconn *conn) |
static PGresult * | getCopyResult (PGconn *conn, ExecStatusType copytype) |
static bool | PQexecStart (PGconn *conn) |
static PGresult * | PQexecFinish (PGconn *conn) |
static int | PQsendTypedCommand (PGconn *conn, char command, char type, const char *target) |
static int | check_field_number (const PGresult *res, int field_num) |
static void | pqPipelineProcessQueue (PGconn *conn) |
static int | pqPipelineSyncInternal (PGconn *conn, bool immediate_flush) |
static int | pqPipelineFlush (PGconn *conn) |
PGresult * | PQmakeEmptyPGresult (PGconn *conn, ExecStatusType status) |
int | PQsetResultAttrs (PGresult *res, int numAttributes, PGresAttDesc *attDescs) |
PGresult * | PQcopyResult (const PGresult *src, int flags) |
int | PQsetvalue (PGresult *res, int tup_num, int field_num, char *value, int len) |
void * | PQresultAlloc (PGresult *res, size_t nBytes) |
void * | pqResultAlloc (PGresult *res, size_t nBytes, bool isBinary) |
size_t | PQresultMemorySize (const PGresult *res) |
char * | pqResultStrdup (PGresult *res, const char *str) |
void | pqSetResultError (PGresult *res, PQExpBuffer errorMessage, int offset) |
void | PQclear (PGresult *res) |
void | pqClearAsyncResult (PGconn *conn) |
void | pqSaveErrorResult (PGconn *conn) |
static void | pqSaveWriteError (PGconn *conn) |
PGresult * | pqPrepareAsyncResult (PGconn *conn) |
void | pqInternalNotice (const PGNoticeHooks *hooks, const char *fmt,...) |
void | pqSaveMessageField (PGresult *res, char code, const char *value) |
void | pqSaveParameterStatus (PGconn *conn, const char *name, const char *value) |
int | pqRowProcessor (PGconn *conn, const char **errmsgp) |
static PGcmdQueueEntry * | pqAllocCmdQueueEntry (PGconn *conn) |
static void | pqAppendCmdQueueEntry (PGconn *conn, PGcmdQueueEntry *entry) |
static void | pqRecycleCmdQueueEntry (PGconn *conn, PGcmdQueueEntry *entry) |
int | PQsendQuery (PGconn *conn, const char *query) |
int | PQsendQueryContinue (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) |
static bool | canChangeResultMode (PGconn *conn) |
int | PQsetSingleRowMode (PGconn *conn) |
int | PQsetChunkedRowsMode (PGconn *conn, int chunkSize) |
int | PQconsumeInput (PGconn *conn) |
int | PQisBusy (PGconn *conn) |
PGresult * | PQgetResult (PGconn *conn) |
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) |
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) |
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 | PQgetlineAsync (PGconn *conn, char *buffer, int bufsize) |
int | PQputline (PGconn *conn, const char *string) |
int | PQputnbytes (PGconn *conn, const char *buffer, int nbytes) |
int | PQendcopy (PGconn *conn) |
PGresult * | PQfn (PGconn *conn, int fnid, int *result_buf, int *result_len, int result_is_int, const PQArgBlock *args, int nargs) |
int | PQenterPipelineMode (PGconn *conn) |
int | PQexitPipelineMode (PGconn *conn) |
void | pqCommandQueueAdvance (PGconn *conn, bool isReadyForQuery, bool gotSync) |
int | PQpipelineSync (PGconn *conn) |
int | PQsendPipelineSync (PGconn *conn) |
int | PQsendFlushRequest (PGconn *conn) |
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) |
static int | check_tuple_field_number (const PGresult *res, int tup_num, int field_num) |
static int | check_param_number (const PGresult *res, int param_num) |
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) |
int | PQsetnonblocking (PGconn *conn, int arg) |
int | PQisnonblocking (const PGconn *conn) |
int | PQisthreadsafe (void) |
int | PQflush (PGconn *conn) |
void | PQfreemem (void *ptr) |
void | PQfreeNotify (PGnotify *notify) |
static size_t | PQescapeStringInternal (PGconn *conn, char *to, const char *from, size_t length, int *error, int encoding, bool std_strings) |
size_t | PQescapeStringConn (PGconn *conn, char *to, const char *from, size_t length, int *error) |
size_t | PQescapeString (char *to, const char *from, size_t length) |
static char * | PQescapeInternal (PGconn *conn, const char *str, size_t len, bool as_ident) |
char * | PQescapeLiteral (PGconn *conn, const char *str, size_t len) |
char * | PQescapeIdentifier (PGconn *conn, const char *str, size_t len) |
static char | get_hex (char c) |
static unsigned char * | PQescapeByteaInternal (PGconn *conn, const unsigned char *from, size_t from_length, size_t *to_length, bool std_strings, bool use_hex) |
unsigned char * | PQescapeByteaConn (PGconn *conn, const unsigned char *from, size_t from_length, size_t *to_length) |
unsigned char * | PQescapeBytea (const unsigned char *from, size_t from_length, size_t *to_length) |
unsigned char * | PQunescapeBytea (const unsigned char *strtext, size_t *retbuflen) |
Variables | |
char *const | pgresStatus [] |
static const PGresult | OOM_result |
static int | static_client_encoding = PG_SQL_ASCII |
static bool | static_std_strings = false |
static const char | hextbl [] = "0123456789abcdef" |
static const int8 | hexlookup [128] |
#define ISFIRSTOCTDIGIT | ( | CH | ) | ((CH) >= '0' && (CH) <= '3') |
#define PGRESULT_ALIGN_BOUNDARY MAXIMUM_ALIGNOF /* from configure */ |
#define PGRESULT_BLOCK_OVERHEAD Max(sizeof(PGresult_data), PGRESULT_ALIGN_BOUNDARY) |
#define PGRESULT_SEP_ALLOC_THRESHOLD (PGRESULT_DATA_BLOCKSIZE / 2) |
Definition at line 1925 of file fe-exec.c.
References pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, PGASYNC_BUSY, pgHavePendingResult, PGQUERY_EXTENDED, PGQUERY_SIMPLE, and PGcmdQueueEntry::queryclass.
Referenced by PQsetChunkedRowsMode(), and PQsetSingleRowMode().
|
static |
Definition at line 3510 of file fe-exec.c.
References pg_result::noticeHooks, pg_result::numAttributes, pqInternalNotice(), and res.
Referenced by PQfformat(), PQfmod(), PQfname(), PQfsize(), PQftable(), PQftablecol(), PQftype(), and PQsetvalue().
|
static |
Definition at line 3548 of file fe-exec.c.
References pg_result::noticeHooks, pg_result::numParameters, pqInternalNotice(), and res.
Referenced by PQparamtype().
|
static |
Definition at line 3525 of file fe-exec.c.
References pg_result::noticeHooks, pg_result::ntups, pg_result::numAttributes, pqInternalNotice(), and res.
Referenced by PQgetisnull(), PQgetlength(), and PQgetvalue().
Definition at line 408 of file fe-exec.c.
References PGEvent::data, free, i, malloc, name, PGEvent::name, PGEvent::passThrough, PGEvent::proc, and PGEvent::resultInitialized.
Referenced by PQcopyResult(), and PQmakeEmptyPGresult().
|
inlinestatic |
Definition at line 4330 of file fe-exec.c.
References hexlookup, and res.
Referenced by PQunescapeBytea().
|
static |
Definition at line 2224 of file fe-exec.c.
References pg_conn::asyncStatus, conn, CONNECTION_OK, PGASYNC_IDLE, PQmakeEmptyPGresult(), pqPrepareAsyncResult(), pqSaveErrorResult(), pg_conn::result, pg_result::resultStatus, and pg_conn::status.
Referenced by PQgetResult().
|
static |
Definition at line 2020 of file fe-exec.c.
References conn, and pqParseInput3().
Referenced by PQgetResult(), PQisBusy(), PQnotifies(), and PQputCopyData().
|
static |
Definition at line 993 of file fe-exec.c.
References if(), libpq_gettext, malloc, pg_result::memorySize, pg_result::ntups, realloc, res, pg_result::tupArrSize, and pg_result::tuples.
Referenced by pqRowProcessor(), and PQsetvalue().
|
static |
Definition at line 1306 of file fe-exec.c.
References pg_conn::cmd_queue_recycle, conn, libpq_append_conn_error(), malloc, PGcmdQueueEntry::next, and PGcmdQueueEntry::query.
Referenced by pqPipelineSyncInternal(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
|
static |
Definition at line 1339 of file fe-exec.c.
References Assert, pg_conn::asyncStatus, pg_conn::cmd_queue_head, pg_conn::cmd_queue_tail, conn, PGcmdQueueEntry::next, PGASYNC_BUSY, PGASYNC_IDLE, PGASYNC_PIPELINE_IDLE, pg_conn::pipelineStatus, PQ_PIPELINE_ABORTED, PQ_PIPELINE_OFF, PQ_PIPELINE_ON, and pqPipelineProcessQueue().
Referenced by pqPipelineSyncInternal(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
int PQbinaryTuples | ( | const PGresult * | res | ) |
Definition at line 3497 of file fe-exec.c.
References pg_result::binary, and res.
Referenced by HandleCopyResult().
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, res, PGEventResultDestroy::result, PGEvent::resultInitialized, and pg_result::tuples.
Referenced by pqClearAsyncResult(), PQcopyResult(), PQexecFinish(), PQexecStart(), pqInternalNotice(), and PQmakeEmptyPGresult().
void pqClearAsyncResult | ( | PGconn * | conn | ) |
Definition at line 779 of file fe-exec.c.
References conn, pg_conn::error_result, PQclear(), pg_conn::result, and pg_conn::saved_result.
Referenced by getAnotherTuple(), getParamDescriptions(), getRowDescriptions(), pqClosePGconn(), PQconnectPoll(), pqGetErrorNotice3(), pqPipelineProcessQueue(), pqSaveErrorResult(), and PQsendQueryStart().
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, and res.
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, pqInternalNotice(), and res.
Referenced by ecpg_process_output(), execute_dml_stmt(), execute_foreign_modify(), and SetResultVariables().
Definition at line 3142 of file fe-exec.c.
References pg_conn::cmd_queue_head, pg_conn::cmd_queue_tail, conn, PGcmdQueueEntry::next, PGQUERY_SIMPLE, PGQUERY_SYNC, pqRecycleCmdQueueEntry(), and PGcmdQueueEntry::queryclass.
Referenced by PQgetResult(), and pqParseInput3().
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().
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().
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 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().
unsigned char* PQescapeBytea | ( | const unsigned char * | from, |
size_t | from_length, | ||
size_t * | to_length | ||
) |
Definition at line 4469 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 4453 of file fe-exec.c.
References pg_conn::cmd_queue_head, conn, pqClearConnErrorState, PQescapeByteaInternal(), pg_conn::std_strings, and pg_conn::sversion.
|
static |
Definition at line 4357 of file fe-exec.c.
References conn, hextbl, i, len, libpq_append_conn_error(), and malloc.
Referenced by PQescapeBytea(), and PQescapeByteaConn().
char* PQescapeIdentifier | ( | PGconn * | conn, |
const char * | str, | ||
size_t | len | ||
) |
Definition at line 4310 of file fe-exec.c.
References conn, len, PQescapeInternal(), and str.
Referenced by create_publication(), create_subscription(), drop_publication(), enable_subscription(), initCreatePKeys(), initCreateTables(), main(), PQchangePassword(), psql_get_variable(), stringlist_to_identifierstr(), and vacuumlo().
Definition at line 4182 of file fe-exec.c.
References pg_conn::client_encoding, pg_conn::cmd_queue_head, conn, i, IS_HIGHBIT_SET, len, libpq_append_conn_error(), malloc, pg_encoding_mblen(), pqClearConnErrorState, and str.
Referenced by PQescapeIdentifier(), and PQescapeLiteral().
char* PQescapeLiteral | ( | PGconn * | conn, |
const char * | str, | ||
size_t | len | ||
) |
Definition at line 4304 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(), 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 4167 of file fe-exec.c.
References PQescapeStringInternal(), static_client_encoding, and static_std_strings.
Referenced by get_comma_elts(), and quote_postgres().
size_t PQescapeStringConn | ( | PGconn * | conn, |
char * | to, | ||
const char * | from, | ||
size_t | length, | ||
int * | error | ||
) |
Definition at line 4145 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(), and do_lo_import().
|
static |
Definition at line 4071 of file fe-exec.c.
References conn, encoding, error(), i, IS_HIGHBIT_SET, len, libpq_append_conn_error(), pg_encoding_mblen(), remaining, source, and SQL_STR_DOUBLE.
Referenced by PQescapeString(), and PQescapeStringConn().
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_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(), 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().
Definition at line 2410 of file fe-exec.c.
References conn, CONNECTION_BAD, PGRES_COPY_BOTH, PGRES_COPY_IN, PGRES_COPY_OUT, PQclear(), PQgetResult(), pg_result::resultStatus, and pg_conn::status.
Referenced by PQclosePortal(), PQclosePrepared(), PQdescribePortal(), PQdescribePrepared(), PQexec(), PQexecParams(), PQexecPrepared(), and PQprepare().
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(), 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().
Definition at line 2344 of file fe-exec.c.
References pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, CONNECTION_BAD, libpq_append_conn_error(), libpq_gettext, PGASYNC_BUSY, PGRES_COPY_BOTH, PGRES_COPY_IN, PGRES_COPY_OUT, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, PQclear(), pqClearConnErrorState, PQgetResult(), PQputCopyEnd(), pg_result::resultStatus, and pg_conn::status.
Referenced by PQclosePortal(), PQclosePrepared(), PQdescribePortal(), PQdescribePrepared(), PQexec(), PQexecParams(), PQexecPrepared(), and PQprepare().
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(), 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(), pgresAttDesc::format, and res.
Referenced by ecpg_get_data(), ecpg_store_result(), and process_queued_fetch_requests().
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(), 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, check_field_number(), and res.
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(), pgresAttDesc::name, and res.
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, pg_tolower(), and res.
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(), 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 PQfreemem | ( | void * | ptr | ) |
Definition at line 4032 of file fe-exec.c.
References free.
Referenced by CopyStreamReceive(), dblink_get_notify(), DescribeQuery(), do_connect(), dumpTableData_copy(), ecpg_process_output(), exec_command_errverbose(), get_base_conninfo(), handleCopyOut(), HandleCopyStream(), HandleEndOfCopyStream(), 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(), StreamLogicalLog(), stringlist_to_identifierstr(), try_complete_step(), and vacuumlo().
void PQfreeNotify | ( | PGnotify * | notify | ) |
Definition at line 4049 of file fe-exec.c.
References PQfreemem().
int PQfsize | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3730 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), res, 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, res, 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(), pgresAttDesc::columnid, and res.
Definition at line 3719 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), InvalidOid, res, 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 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().
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, res, 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(), 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(), 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(), run_simple_query(), RunIdentifySystem(), sqlda_common_total_size(), StoreQueryTuple(), storeRow(), vacuum_one_database(), 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, res, 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 | ||
) |
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(), res, pg_conn::result, pg_result::resultStatus, and pg_conn::write_failed.
Referenced by advanceConnectionState(), BaseBackup(), ClearOrSaveAllResults(), confirm_query_canceled_impl(), consumeQueryResult(), 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().
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(), res, 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_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(), dumpRoleGUCPrivs(), dumpRoleMembership(), dumpRoles(), dumpRule(), dumpSearchPath(), dumpSequence(), dumpSequenceData(), dumpStatisticsExt(), dumpTable(), dumpTableAttach(), dumpTableData_insert(), dumpTableSchema(), dumpTablespaces(), dumpTSConfig(), dumpTSDictionary(), dumpUserConfig(), dumpUserMappings(), ecpg_get_data(), 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_object_list(), get_primary_sysid(), get_remote_estimate(), get_subscription_count(), get_synchronized_snapshot(), 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(), 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(), vacuum_one_database(), vacuumlo(), verify_heap_slot_handler(), and wait_for_connection_state().
void pqInternalNotice | ( | const PGNoticeHooks * | hooks, |
const char * | fmt, | ||
... | |||
) |
Definition at line 938 of file fe-exec.c.
References generate_unaccent_rules::args, pg_result::errMsg, fmt, libpq_gettext, pg_result::noticeHooks, PGNoticeHooks::noticeRec, PGNoticeHooks::noticeRecArg, PG_DIAG_MESSAGE_PRIMARY, PG_DIAG_SEVERITY, PG_DIAG_SEVERITY_NONLOCALIZED, PGRES_NONFATAL_ERROR, PQclear(), PQmakeEmptyPGresult(), pqResultAlloc(), pqSaveMessageField(), res, sprintf, va_end(), va_start(), and vsnprintf.
Referenced by check_field_number(), check_param_number(), check_tuple_field_number(), PQcmdTuples(), pqEndcopy3(), pqGetInt(), pqParseInput3(), pqPutInt(), and PQsetvalue().
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 | ) |
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 PQnfields | ( | const PGresult * | res | ) |
Definition at line 3489 of file fe-exec.c.
References pg_result::numAttributes, and res.
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, and res.
int PQntuples | ( | const PGresult * | res | ) |
Definition at line 3481 of file fe-exec.c.
References pg_result::ntups, and res.
Referenced by add_tablespace_footer(), addFooterToPublicationDesc(), append_depends_on_extension(), appendQualifiedRelation(), BaseBackup(), buildMatViewRefreshDependencies(), check_and_drop_existing_subscriptions(), 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(), dumpRoleGUCPrivs(), dumpRoleMembership(), dumpRoles(), dumpRule(), dumpSequence(), dumpSequenceData(), dumpTable(), dumpTableData_insert(), dumpTablespaces(), dumpTSConfig(), dumpUserConfig(), dumpUserMappings(), 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_object_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(), 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(), vacuum_one_database(), vacuumlo(), verify_btree_slot_handler(), verify_heap_slot_handler(), and wait_for_connection_state().
char* PQoidStatus | ( | const PGresult * | res | ) |
Definition at line 3793 of file fe-exec.c.
References pg_result::cmdStatus, InvalidOid, and res.
Referenced by ecpg_process_output(), and PrintQueryStatus().
Definition at line 3926 of file fe-exec.c.
References check_param_number(), InvalidOid, pg_result::paramDescs, res, and pgresParamDesc::typid.
|
static |
Definition at line 4016 of file fe-exec.c.
References conn, OUTBUFFER_THRESHOLD, pg_conn::outCount, pg_conn::pipelineStatus, PQ_PIPELINE_ON, and pqFlush().
Referenced by pqPipelineSyncInternal(), PQsendFlushRequest(), PQsendPrepare(), PQsendQueryGuts(), and PQsendTypedCommand().
|
static |
Definition at line 3180 of file fe-exec.c.
References Assert, pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, libpq_append_conn_error(), pg_conn::maxChunkSize, pg_conn::partialResMode, PGASYNC_BUSY, PGASYNC_COPY_BOTH, PGASYNC_COPY_IN, PGASYNC_COPY_OUT, PGASYNC_IDLE, PGASYNC_PIPELINE_IDLE, PGASYNC_READY, PGASYNC_READY_MORE, PGQUERY_SYNC, PGRES_PIPELINE_ABORTED, pg_conn::pipelineStatus, PQ_PIPELINE_ABORTED, PQ_PIPELINE_OFF, pqClearAsyncResult(), pqClearConnErrorState, PQmakeEmptyPGresult(), pqSaveErrorResult(), PGcmdQueueEntry::queryclass, pg_conn::result, and pg_conn::singleRowMode.
Referenced by pqAppendCmdQueueEntry(), and PQgetResult().
int PQpipelineSync | ( | PGconn * | conn | ) |
Definition at line 3272 of file fe-exec.c.
References conn, and pqPipelineSyncInternal().
Referenced by discardUntilSync(), executeMetaCommand(), test_multi_pipelines(), test_pipeline_abort(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), and test_transaction().
Definition at line 3294 of file fe-exec.c.
References appendPQExpBufferStr(), pg_conn::asyncStatus, conn, pg_conn::errorMessage, 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, PGQUERY_SYNC, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqAllocCmdQueueEntry(), pqAppendCmdQueueEntry(), pqFlush(), PqMsg_Sync, pqPipelineFlush(), pqPutMsgEnd(), pqPutMsgStart(), pqRecycleCmdQueueEntry(), PGcmdQueueEntry::query, and PGcmdQueueEntry::queryclass.
Referenced by PQpipelineSync(), and PQsendPipelineSync().
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().
Definition at line 851 of file fe-exec.c.
References conn, pg_conn::error_result, pg_conn::errorMessage, pg_conn::errorReported, PQExpBufferData::len, libpq_append_conn_error(), OOM_result, PGRES_EMPTY_QUERY, PGRES_FATAL_ERROR, PQmakeEmptyPGresult(), pqSetResultError(), res, pg_conn::result, pg_result::resultStatus, pg_conn::saved_result, and unconstify.
Referenced by getCopyResult(), pqFunctionCall3(), and PQgetResult().
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().
|
static |
Definition at line 1386 of file fe-exec.c.
References Assert, pg_conn::cmd_queue_recycle, conn, free, PGcmdQueueEntry::next, and PGcmdQueueEntry::query.
Referenced by pqCommandQueueAdvance(), pqPipelineSyncInternal(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
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, pqResultAlloc(), and res.
Referenced by PQsetResultAttrs().
Definition at line 563 of file fe-exec.c.
References pg_result::curBlock, pg_result::curOffset, malloc, pg_result::memorySize, pgresult_data::next, pg_result::null_field, PGRESULT_ALIGN_BOUNDARY, PGRESULT_BLOCK_OVERHEAD, PGRESULT_DATA_BLOCKSIZE, PGRESULT_SEP_ALLOC_THRESHOLD, res, pgresult_data::space, and pg_result::spaceLeft.
Referenced by getCopyStart(), getParamDescriptions(), getRowDescriptions(), pqInternalNotice(), PQresultAlloc(), pqResultStrdup(), pqRowProcessor(), pqSaveMessageField(), and PQsetvalue().
char* PQresultErrorField | ( | const PGresult * | res, |
int | fieldcode | ||
) |
Definition at line 3466 of file fe-exec.c.
References pgMessageField::code, pgMessageField::contents, pg_result::errFields, pgMessageField::next, and res.
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, and res.
Referenced by check_and_drop_existing_subscriptions(), 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, and res.
ExecStatusType PQresultStatus | ( | const PGresult * | res | ) |
Definition at line 3411 of file fe-exec.c.
References PGRES_FATAL_ERROR, res, and pg_result::resultStatus.
Referenced by _doSetSessionAuth(), _printTableAccessMethodNoStorage(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), AcceptResult(), advanceConnectionState(), BaseBackup(), check_and_drop_existing_subscriptions(), 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(), discardUntilSync(), do_sql_command_end(), drop_existing_subscriptions(), drop_failover_replication_slots(), drop_publication(), drop_replication_slot(), DropReplicationSlot(), dumpTableData_copy(), ecpg_check_PQresult(), 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(), 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* pqResultStrdup | ( | PGresult * | res, |
const char * | str | ||
) |
Definition at line 675 of file fe-exec.c.
References pqResultAlloc(), res, and str.
Referenced by getRowDescriptions(), pqGetErrorNotice3(), PQsetResultAttrs(), and pqSetResultError().
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, res, pg_result::resultStatus, and termPQExpBuffer().
Referenced by exec_command_errverbose().
int pqRowProcessor | ( | PGconn * | conn, |
const char ** | errmsgp | ||
) |
Definition at line 1206 of file fe-exec.c.
References pg_conn::asyncStatus, pg_result::attDescs, conn, pgresAttDesc::format, i, pgresAttValue::len, pgDataValue::len, pg_conn::maxChunkSize, pg_result::ntups, pg_result::null_field, NULL_LEN, pg_result::numAttributes, pg_conn::partialResMode, PG_COPYRES_ATTRS, PG_COPYRES_EVENTS, PG_COPYRES_NOTICEHOOKS, PGASYNC_READY_MORE, PGRES_SINGLE_TUPLE, PGRES_TUPLES_CHUNK, pqAddTuple(), PQcopyResult(), pqResultAlloc(), res, pg_conn::result, pg_result::resultStatus, pg_conn::rowBuf, pg_conn::saved_result, pg_conn::singleRowMode, val, value, and pgresAttValue::value.
Referenced by getAnotherTuple().
void pqSaveErrorResult | ( | PGconn * | conn | ) |
Definition at line 803 of file fe-exec.c.
References conn, pg_conn::error_result, and pqClearAsyncResult().
Referenced by getAnotherTuple(), getCopyResult(), getParamDescriptions(), getRowDescriptions(), handleSyncLoss(), pqFunctionCall3(), PQgetResult(), pqParseInput3(), pqPipelineProcessQueue(), and pqSaveWriteError().
void pqSaveMessageField | ( | PGresult * | res, |
char | code, | ||
const char * | value | ||
) |
Definition at line 1060 of file fe-exec.c.
References pgMessageField::code, pgMessageField::contents, pg_result::errFields, pgMessageField::next, pqResultAlloc(), res, and value.
Referenced by pqGetErrorNotice3(), and pqInternalNotice().
void pqSaveParameterStatus | ( | PGconn * | conn, |
const char * | name, | ||
const char * | value | ||
) |
Definition at line 1081 of file fe-exec.c.
References pg_conn::client_encoding, conn, pg_conn::default_transaction_read_only, free, pg_conn::in_hot_standby, malloc, name, pgParameterStatus::name, pgParameterStatus::next, PG_BOOL_NO, PG_BOOL_YES, pg_char_to_encoding, PG_SQL_ASCII, pg_conn::pstatus, pg_conn::scram_sha_256_iterations, static_client_encoding, static_std_strings, pg_conn::std_strings, pg_conn::sversion, value, and pgParameterStatus::value.
Referenced by getParameterStatus().
|
static |
Definition at line 820 of file fe-exec.c.
References appendPQExpBufferStr(), conn, pg_conn::errorMessage, libpq_append_conn_error(), pqSaveErrorResult(), and pg_conn::write_err_msg.
Referenced by PQgetResult().
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 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 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 PQsendQueryContinue | ( | PGconn * | conn, |
const char * | query | ||
) |
Definition at line 1422 of file fe-exec.c.
References conn, and PQsendQueryInternal().
Referenced by PQconnectPoll().
|
static |
Definition at line 1757 of file fe-exec.c.
References conn, i, libpq_append_conn_error(), PGQUERY_EXTENDED, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqAllocCmdQueueEntry(), pqAppendCmdQueueEntry(), PqMsg_Bind, PqMsg_Describe, PqMsg_Execute, PqMsg_Parse, PqMsg_Sync, pqPipelineFlush(), pqPutc(), pqPutInt(), pqPutMsgEnd(), pqPutMsgStart(), pqPutnchar(), pqPuts(), pqRecycleCmdQueueEntry(), PGcmdQueueEntry::query, and PGcmdQueueEntry::queryclass.
Referenced by PQsendQueryParams(), and PQsendQueryPrepared().
Definition at line 1428 of file fe-exec.c.
References conn, libpq_append_conn_error(), PGQUERY_SIMPLE, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqAllocCmdQueueEntry(), pqAppendCmdQueueEntry(), pqFlush(), PqMsg_Query, pqPutMsgEnd(), pqPutMsgStart(), pqPuts(), pqRecycleCmdQueueEntry(), PQsendQueryStart(), PGcmdQueueEntry::query, and PGcmdQueueEntry::queryclass.
Referenced by PQsendQuery(), and PQsendQueryContinue().
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().
Definition at line 1673 of file fe-exec.c.
References pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, CONNECTION_OK, libpq_append_conn_error(), pg_conn::maxChunkSize, pg_conn::partialResMode, 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, pqClearAsyncResult(), pqClearConnErrorState, pg_conn::singleRowMode, and pg_conn::status.
Referenced by PQsendPrepare(), PQsendQueryInternal(), PQsendQueryParams(), PQsendQueryPrepared(), and PQsendTypedCommand().
|
static |
Definition at line 2589 of file fe-exec.c.
References conn, libpq_append_conn_error(), PGQUERY_CLOSE, PGQUERY_DESCRIBE, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqAllocCmdQueueEntry(), pqAppendCmdQueueEntry(), PqMsg_Close, PqMsg_Describe, PqMsg_Sync, pqPipelineFlush(), pqPutc(), pqPutMsgEnd(), pqPutMsgStart(), pqPuts(), pqRecycleCmdQueueEntry(), PQsendQueryStart(), PGcmdQueueEntry::queryclass, and type.
Referenced by PQclosePortal(), PQclosePrepared(), PQdescribePortal(), PQdescribePrepared(), PQsendClosePortal(), PQsendClosePrepared(), PQsendDescribePortal(), and PQsendDescribePrepared().
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 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().
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(), pqResultStrdup(), and res.
Referenced by PQcopyResult().
void pqSetResultError | ( | PGresult * | res, |
PQExpBuffer | errorMessage, | ||
int | offset | ||
) |
Definition at line 692 of file fe-exec.c.
References PQExpBufferData::data, pg_result::errMsg, libpq_gettext, PQExpBufferBroken, pqResultStrdup(), and res.
Referenced by pqGetErrorNotice3(), PQmakeEmptyPGresult(), and pqPrepareAsyncResult().
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().
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(), res, pg_result::tuples, value, and pgresAttValue::value.
Referenced by PQcopyResult().
unsigned char* PQunescapeBytea | ( | const unsigned char * | strtext, |
size_t * | retbuflen | ||
) |
|
static |
Definition at line 4318 of file fe-exec.c.
Referenced by get_hex().
|
static |
Definition at line 4316 of file fe-exec.c.
Referenced by PQescapeByteaInternal().
|
static |
Definition at line 49 of file fe-exec.c.
Referenced by PQclear(), pqPrepareAsyncResult(), PQresultAlloc(), PQsetResultAttrs(), and PQsetvalue().
char* const pgresStatus[] |
Definition at line 32 of file fe-exec.c.
Referenced by PQresStatus().
|
static |
Definition at line 59 of file fe-exec.c.
Referenced by PQescapeString(), and pqSaveParameterStatus().
Definition at line 60 of file fe-exec.c.
Referenced by PQescapeBytea(), PQescapeString(), and pqSaveParameterStatus().