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 | 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) |
int | PQsetSingleRowMode (PGconn *conn) |
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) |
int | PQpipelineSync (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) |
|
static |
Definition at line 3424 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 3462 of file fe-exec.c.
References pg_result::noticeHooks, pg_result::numParameters, pqInternalNotice(), and res.
Referenced by PQparamtype().
|
static |
Definition at line 3439 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 405 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 4244 of file fe-exec.c.
References hexlookup, and res.
Referenced by PQunescapeBytea().
|
static |
Definition at line 2190 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 1993 of file fe-exec.c.
References conn, and pqParseInput3().
Referenced by PQgetResult(), PQisBusy(), PQnotifies(), and PQputCopyData().
|
static |
Definition at line 988 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 1312 of file fe-exec.c.
References pg_conn::cmd_queue_recycle, conn, libpq_append_conn_error(), malloc, PGcmdQueueEntry::next, and PGcmdQueueEntry::query.
Referenced by PQpipelineSync(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
|
static |
Definition at line 1345 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 PQpipelineSync(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
int PQbinaryTuples | ( | const PGresult * | res | ) |
Definition at line 3411 of file fe-exec.c.
References pg_result::binary, and res.
Referenced by HandleCopyResult().
void PQclear | ( | PGresult * | res | ) |
Definition at line 718 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(), PQmakeEmptyPGresult(), and pqRowProcessor().
void pqClearAsyncResult | ( | PGconn * | conn | ) |
Definition at line 776 of file fe-exec.c.
References conn, pg_conn::error_result, pg_conn::next_result, PQclear(), and pg_conn::result.
Referenced by closePGconn(), getAnotherTuple(), getParamDescriptions(), getRowDescriptions(), PQconnectPoll(), pqGetErrorNotice3(), pqPipelineProcessQueue(), pqSaveErrorResult(), and PQsendQueryStart().
Definition at line 2505 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), PqMsg_Close, and PQsendTypedCommand().
Referenced by test_prepared().
Definition at line 2487 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 3666 of file fe-exec.c.
References pg_result::cmdStatus, and res.
Referenced by dblink_exec(), ecpg_process_output(), ExecQueryAndProcessResults(), materializeResult(), PrintQueryResult(), PrintQueryStatus(), and test_pipelined_insert().
char* PQcmdTuples | ( | PGresult * | res | ) |
Definition at line 3736 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().
void pqCommandQueueAdvance | ( | PGconn * | conn | ) |
Definition at line 3095 of file fe-exec.c.
References pg_conn::cmd_queue_head, pg_conn::cmd_queue_tail, conn, PGcmdQueueEntry::next, and pqRecycleCmdQueueEntry().
Referenced by PQgetResult(), and pqParseInput3().
int PQconsumeInput | ( | PGconn * | conn | ) |
Definition at line 1957 of file fe-exec.c.
References conn, pqFlush(), pqIsnonblocking, and pqReadData().
Referenced by advanceConnectionState(), CopyStreamReceive(), dblink_get_notify(), dblink_is_busy(), do_sql_command_end(), ecpg_process_output(), libpqrcv_PQgetResult(), libpqrcv_receive(), main(), pgfdw_cancel_query_end(), pgfdw_exec_cleanup_query_end(), pgfdw_get_cleanup_result(), pgfdw_get_result(), postgresForeignAsyncNotify(), PQconnectPoll(), PrintNotifications(), StreamLogicalLog(), test_nosync(), test_pipelined_insert(), test_uniqviol(), try_complete_step(), and wait_on_slots().
Definition at line 315 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 2440 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), PqMsg_Describe, and PQsendTypedCommand().
Referenced by test_prepared().
Definition at line 2421 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 2915 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 3008 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 4383 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 4367 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 4271 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 4224 of file fe-exec.c.
References conn, len, PQescapeInternal(), and generate_unaccent_rules::str.
Referenced by initCreatePKeys(), initCreateTables(), main(), psql_get_variable(), stringlist_to_identifierstr(), and vacuumlo().
Definition at line 4096 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 generate_unaccent_rules::str.
Referenced by PQescapeIdentifier(), and PQescapeLiteral().
char* PQescapeLiteral | ( | PGconn * | conn, |
const char * | str, | ||
size_t | len | ||
) |
Definition at line 4218 of file fe-exec.c.
References conn, len, PQescapeInternal(), and generate_unaccent_rules::str.
Referenced by DescribeQuery(), libpqrcv_startstreaming(), psql_get_variable(), and set_locale_and_encoding().
size_t PQescapeString | ( | char * | to, |
const char * | from, | ||
size_t | length | ||
) |
Definition at line 4081 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 4059 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 3985 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 2228 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendQuery().
Referenced by _doSetSessionAuth(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), check_loadable_libraries(), check_prepare_conn(), CreateReplicationSlot(), dblink_close(), dblink_exec(), dblink_fetch(), dblink_open(), deallocate_one(), DescribeQuery(), DropReplicationSlot(), ecpg_autostart_transaction(), ecpg_execute(), ECPGsetcommit(), ECPGtrans(), ExecQueryUsingCursor(), executeCommand(), executeMaintenanceCommand(), executeQuery(), executeQueryOrDie(), ExecuteSqlCommand(), ExecuteSqlQuery(), ExecuteSqlStatement(), executeStatement(), get_create_object_cmd(), GetConnection(), GetSlotInformation(), GetTableInfo(), init_libpq_conn(), initPopulateTable(), libpq_traverse_files(), lo_initialize(), lockTableForWorker(), lookup_object_oid(), main(), pgfdw_xact_callback(), PQencryptPasswordConn(), PQsetClientEncoding(), PSQLexec(), ReceiveXlogStream(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_permutation(), run_simple_command(), run_simple_query(), RunIdentifySystem(), SendQuery(), sql_conn(), sql_exec(), StreamLogicalLog(), test_disallowed_in_pipeline(), test_pipeline_abort(), test_prepared(), test_transaction(), test_uniqviol(), tryExecuteStatement(), and vacuumlo().
Definition at line 2376 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 2242 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendQueryParams().
Referenced by ecpg_execute(), libpq_fetch_file(), and main().
PGresult* PQexecPrepared | ( | PGconn * | conn, |
const char * | stmtName, | ||
int | nParams, | ||
const char *const * | paramValues, | ||
const int * | paramLengths, | ||
const int * | paramFormats, | ||
int | resultFormat | ||
) |
Definition at line 2289 of file fe-exec.c.
References conn, PQexecFinish(), PQexecStart(), and PQsendQueryPrepared().
Referenced by ecpg_execute(), and try_complete_step().
Definition at line 2310 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 3039 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 3622 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 3914 of file fe-exec.c.
References conn, CONNECTION_BAD, pqFlush(), and pg_conn::status.
Referenced by CheckCopyStreamStop(), HandleEndOfCopyStream(), libpqrcv_endstreaming(), libpqrcv_send(), PQpipelineSync(), prepareToTerminate(), ProcessXLogDataMsg(), sendFeedback(), test_nosync(), test_pipelined_insert(), and test_uniqviol().
int PQfmod | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3655 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 2946 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 3481 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 3503 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_pg_class_oids(), binary_upgrade_set_type_oids_by_type_oid(), buildMatViewRefreshDependencies(), check_for_data_types_usage(), check_for_incompatible_polymorphics(), check_for_isn_and_int8_passing_mismatch(), check_for_pg_role_prefix(), check_for_tables_with_oids(), check_for_user_defined_encoding_conversions(), check_for_user_defined_postfix_ops(), check_proper_datallowconn(), 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_rel_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(), getTableAttrs(), getTables(), getTransforms(), getTriggers(), getTSConfigurations(), getTSDictionaries(), getTSParsers(), getTSTemplates(), getTypes(), old_9_6_invalidate_hash_indexes(), processExtensionTables(), report_extension_updates(), set_frozenxids(), and show_binary_results().
void PQfreemem | ( | void * | ptr | ) |
Definition at line 3946 of file fe-exec.c.
References free.
Referenced by CopyStreamReceive(), dblink_get_notify(), DescribeQuery(), do_connect(), dumpTableData_copy(), ecpg_process_output(), exec_command_errverbose(), exec_command_password(), handleCopyOut(), HandleCopyStream(), HandleEndOfCopyStream(), initCreatePKeys(), initCreateTables(), libpqrcv_check_conninfo(), libpqrcv_disconnect(), libpqrcv_receive(), libpqrcv_startstreaming(), main(), 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 3963 of file fe-exec.c.
References PQfreemem().
int PQfsize | ( | const PGresult * | res, |
int | field_num | ||
) |
Definition at line 3644 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 3600 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 3611 of file fe-exec.c.
References pg_result::attDescs, check_field_number(), pgresAttDesc::columnid, and res.
Definition at line 3633 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 2782 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 3815 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(), 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(), getForeignDataWrappers(), getForeignServers(), getFuncs(), getLOs(), getNamespaces(), getPolicies(), getProcLangs(), getPublicationTables(), GetSlotInformation(), getSubscriptions(), getTableAttrs(), GetTableInfo(), getTables(), getTriggers(), 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 3801 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 2867 of file fe-exec.c.
References bufsize, conn, and pqGetlineAsync3().
Referenced by pqGetline3().
Definition at line 2035 of file fe-exec.c.
References Assert(), pg_conn::asyncStatus, pg_conn::cmd_queue_head, 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, PGQUERY_SIMPLE, PGRES_COPY_BOTH, PGRES_COPY_IN, PGRES_COPY_OUT, PGRES_PIPELINE_SYNC, pg_conn::pipelineStatus, PQ_PIPELINE_OFF, pqCommandQueueAdvance(), PQfireResultCreateEvents(), pqFlush(), pqPipelineProcessQueue(), pqPrepareAsyncResult(), pqReadData(), pqSaveErrorResult(), pqSaveWriteError(), pqWait(), PGcmdQueueEntry::queryclass, res, pg_result::resultStatus, and pg_conn::write_failed.
Referenced by advanceConnectionState(), BaseBackup(), ClearOrSaveAllResults(), consumeQueryResult(), dblink_record_internal(), discardUntilSync(), dumpTableData_copy(), ecpg_process_output(), EndDBCopyMode(), ExecQueryAndProcessResults(), handleCopyIn(), handleCopyOut(), HandleEndOfCopyStream(), libpqrcv_PQgetResult(), pgfdw_finish_pre_commit_cleanup(), pgfdw_get_cleanup_result(), pgfdw_get_result(), PQconnectPoll(), pqEndcopy3(), PQexecFinish(), PQexecStart(), process_queued_fetch_requests(), process_result(), readCommandResponse(), ReceiveCopyData(), ReceiveXlogStream(), storeQueryResult(), 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 3790 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_pg_class_oids(), binary_upgrade_set_type_oids_by_type_oid(), buildMatViewRefreshDependencies(), check_for_data_types_usage(), check_for_incompatible_polymorphics(), check_for_isn_and_int8_passing_mismatch(), check_for_pg_role_prefix(), check_for_tables_with_oids(), check_for_user_defined_encoding_conversions(), check_for_user_defined_postfix_ops(), check_is_install_user(), check_proper_datallowconn(), cluster_all_databases(), collectComments(), collectRoleNames(), collectSecLabels(), compile_database_list(), compile_relation_list_one_db(), convertTSFunction(), createViewAsClause(), describeOneTableDetails(), describePublications(), describeRoles(), describeTableDetails(), do_field(), dropDBs(), dropRoles(), dropTablespaces(), dumpAgg(), dumpBaseType(), dumpCollation(), dumpCompositeType(), dumpCompositeTypeColComments(), dumpConversion(), dumpDatabase(), dumpDatabaseConfig(), dumpDatabases(), dumpDomain(), dumpEnumType(), dumpForeignServer(), dumpFunc(), dumpLOs(), 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(), 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_rel_infos(), get_remote_estimate(), 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(), 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_queued_fetch_requests(), process_result(), processExtensionTables(), readCommandResponse(), ReadEndOfStreamingResult(), ReceiveXlogStream(), reindex_all_databases(), report_extension_updates(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_simple_query(), RunIdentifySystem(), set_frozenxids(), 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(), and verify_heap_slot_handler().
void pqInternalNotice | ( | const PGNoticeHooks * | hooks, |
const char * | fmt, | ||
... | |||
) |
Definition at line 933 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 2004 of file fe-exec.c.
References pg_conn::asyncStatus, conn, CONNECTION_BAD, parseInput(), PGASYNC_BUSY, and pg_conn::status.
Referenced by advanceConnectionState(), dblink_is_busy(), libpqrcv_PQgetResult(), pgfdw_get_cleanup_result(), pgfdw_get_result(), PQconnectPoll(), pqEndcopy3(), test_disallowed_in_pipeline(), test_pipelined_insert(), test_uniqviol(), try_complete_step(), and wait_on_slots().
int PQisnonblocking | ( | const PGconn * | conn | ) |
Definition at line 3897 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 157 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_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 3403 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(), and test_prepared().
Definition at line 2633 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 3829 of file fe-exec.c.
References pg_result::numParameters, and res.
int PQntuples | ( | const PGresult * | res | ) |
Definition at line 3395 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_for_data_types_usage(), check_for_incompatible_polymorphics(), check_for_isn_and_int8_passing_mismatch(), check_for_pg_role_prefix(), check_for_prepared_transactions(), check_for_tables_with_oids(), check_for_user_defined_encoding_conversions(), check_for_user_defined_postfix_ops(), check_is_install_user(), check_proper_datallowconn(), cluster_all_databases(), collectComments(), collectRoleNames(), collectSecLabels(), compile_database_list(), compile_relation_list_one_db(), CreateReplicationSlot(), createViewAsClause(), describeOneTableDetails(), describePublications(), describeRoles(), describeTableDetails(), dropDBs(), DropReplicationSlot(), dropRoles(), dropTablespaces(), dumpCompositeType(), dumpCompositeTypeColComments(), dumpDatabase(), dumpDatabaseConfig(), dumpDatabases(), dumpEnumType(), dumpLOs(), 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(), ExecQueryUsingCursor(), 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(), get_create_object_cmd(), get_db_infos(), get_loadable_libraries(), get_parallel_object_list(), get_rel_infos(), 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(), 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_queued_fetch_requests(), processExtensionTables(), readCommandResponse(), ReadEndOfStreamingResult(), ReceiveXlogStream(), reindex_all_databases(), report_extension_updates(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_simple_query(), RunIdentifySystem(), set_frozenxids(), 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(), and verify_heap_slot_handler().
char* PQoidStatus | ( | const PGresult * | res | ) |
Definition at line 3707 of file fe-exec.c.
References pg_result::cmdStatus, InvalidOid, and res.
Referenced by ecpg_process_output(), and PrintQueryStatus().
Definition at line 3840 of file fe-exec.c.
References check_param_number(), InvalidOid, pg_result::paramDescs, res, and pgresParamDesc::typid.
|
static |
Definition at line 3930 of file fe-exec.c.
References conn, OUTBUFFER_THRESHOLD, pg_conn::outCount, pg_conn::pipelineStatus, PQ_PIPELINE_ON, and pqFlush().
Referenced by PQsendPrepare(), PQsendQueryGuts(), and PQsendTypedCommand().
|
static |
Definition at line 3120 of file fe-exec.c.
References Assert(), 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, 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 3226 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, pqPutMsgEnd(), pqPutMsgStart(), pqRecycleCmdQueueEntry(), PGcmdQueueEntry::query, and PGcmdQueueEntry::queryclass.
Referenced by discardUntilSync(), executeMetaCommand(), test_multi_pipelines(), test_pipeline_abort(), test_pipelined_insert(), test_prepared(), test_simple_pipeline(), test_singlerowmode(), and test_transaction().
PGresult* PQprepare | ( | PGconn * | conn, |
const char * | stmtName, | ||
const char * | query, | ||
int | nParams, | ||
const Oid * | paramTypes | ||
) |
Definition at line 2272 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 846 of file fe-exec.c.
References conn, pg_conn::error_result, pg_conn::errorMessage, pg_conn::errorReported, PQExpBufferData::len, libpq_append_conn_error(), pg_conn::next_result, OOM_result, PGRES_EMPTY_QUERY, PGRES_FATAL_ERROR, PQmakeEmptyPGresult(), pqSetResultError(), res, pg_conn::result, pg_result::resultStatus, and unconstify.
Referenced by getCopyResult(), pqFunctionCall3(), and PQgetResult().
int PQputCopyData | ( | PGconn * | conn, |
const char * | buffer, | ||
int | nbytes | ||
) |
Definition at line 2661 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 ExecuteSqlCommandBuf(), handleCopyIn(), libpqrcv_send(), PQputnbytes(), and sendFeedback().
int PQputCopyEnd | ( | PGconn * | conn, |
const char * | errormsg | ||
) |
Definition at line 2715 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 CheckCopyStreamStop(), EndDBCopyMode(), handleCopyIn(), HandleEndOfCopyStream(), libpqrcv_endstreaming(), PQexecStart(), prepareToTerminate(), and ProcessXLogDataMsg().
int PQputline | ( | PGconn * | conn, |
const char * | string | ||
) |
Definition at line 2884 of file fe-exec.c.
References conn, and PQputnbytes().
Referenced by initPopulateTable().
int PQputnbytes | ( | PGconn * | conn, |
const char * | buffer, | ||
int | nbytes | ||
) |
Definition at line 2894 of file fe-exec.c.
References conn, and PQputCopyData().
Referenced by PQputline().
|
static |
Definition at line 1392 of file fe-exec.c.
References Assert(), pg_conn::cmd_queue_recycle, conn, free, PGcmdQueueEntry::next, and PGcmdQueueEntry::query.
Referenced by pqCommandQueueAdvance(), PQpipelineSync(), PQsendPrepare(), PQsendQueryGuts(), PQsendQueryInternal(), and PQsendTypedCommand().
char* PQresStatus | ( | ExecStatusType | status | ) |
Definition at line 3333 of file fe-exec.c.
References lengthof, libpq_gettext, and pgresStatus.
Referenced by 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 540 of file fe-exec.c.
References OOM_result, pqResultAlloc(), and res.
Referenced by PQsetResultAttrs().
Definition at line 560 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 3380 of file fe-exec.c.
References pgMessageField::code, pgMessageField::contents, pg_result::errFields, pgMessageField::next, and res.
Referenced by BaseBackup(), 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 3341 of file fe-exec.c.
References pg_result::errMsg, and res.
Referenced by defaultNoticeReceiver(), ecpg_check_PQresult(), ecpg_process_output(), ExecQueryAndProcessResults(), init_libpq_conn(), libpq_fetch_file(), libpq_traverse_files(), process_queued_fetch_requests(), ReceiveXlogStream(), run_simple_command(), run_simple_query(), StreamLogicalLog(), test_pipeline_abort(), and try_complete_step().
size_t PQresultMemorySize | ( | const PGresult * | res | ) |
Definition at line 660 of file fe-exec.c.
References pg_result::memorySize, and res.
ExecStatusType PQresultStatus | ( | const PGresult * | res | ) |
Definition at line 3325 of file fe-exec.c.
References PGRES_FATAL_ERROR, res, and pg_result::resultStatus.
Referenced by _doSetSessionAuth(), _selectOutputSchema(), _selectTableAccessMethod(), _selectTablespace(), AcceptResult(), advanceConnectionState(), BaseBackup(), check_loadable_libraries(), check_prepare_conn(), ClearOrSaveResult(), close_cursor(), compile_database_list(), compile_relation_list_one_db(), create_cursor(), CreateReplicationSlot(), dblink_close(), dblink_exec(), dblink_fetch(), dblink_open(), dblink_record_internal(), deallocate_query(), DescribeQuery(), discardUntilSync(), do_sql_command_end(), DropReplicationSlot(), dumpTableData_copy(), ecpg_check_PQresult(), ecpg_process_output(), EndDBCopyMode(), ExecQueryAndProcessResults(), ExecQueryUsingCursor(), execute_dml_stmt(), execute_foreign_modify(), executeCommand(), executeMaintenanceCommand(), executeQuery(), executeQueryOrDie(), ExecuteSqlCommand(), ExecuteSqlQuery(), ExecuteSqlStatement(), executeStatement(), fetch_more_data(), get_create_object_cmd(), get_remote_estimate(), GetConnection(), GetSlotInformation(), GetTableInfo(), handleCopyIn(), handleCopyOut(), HandleCopyResult(), HandleEndOfCopyStream(), init_libpq_conn(), initPopulateTable(), libpq_fetch_file(), libpq_traverse_files(), libpqrcv_connect(), libpqrcv_create_slot(), libpqrcv_endstreaming(), libpqrcv_exec(), libpqrcv_identify_system(), libpqrcv_PQexec(), libpqrcv_readtimelinehistoryfile(), libpqrcv_receive(), libpqrcv_startstreaming(), 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(), PrintResultInCrosstab(), process_queued_fetch_requests(), process_result(), readCommandResponse(), ReceiveCopyData(), ReceiveXlogStream(), RetrieveDataDirCreatePerm(), RetrieveWalSegSize(), run_permutation(), run_simple_command(), run_simple_query(), RunIdentifySystem(), SendQuery(), 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(), and verify_heap_slot_handler().
char* pqResultStrdup | ( | PGresult * | res, |
const char * | str | ||
) |
Definition at line 672 of file fe-exec.c.
References pqResultAlloc(), res, and generate_unaccent_rules::str.
Referenced by getRowDescriptions(), pqGetErrorNotice3(), PQsetResultAttrs(), and pqSetResultError().
char* PQresultVerboseErrorMessage | ( | const PGresult * | res, |
PGVerbosity | verbosity, | ||
PGContextVisibility | show_context | ||
) |
Definition at line 3349 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::next_result, pg_result::null_field, NULL_LEN, pg_result::numAttributes, PG_COPYRES_ATTRS, PG_COPYRES_EVENTS, PG_COPYRES_NOTICEHOOKS, PGASYNC_READY_MORE, PGRES_SINGLE_TUPLE, pqAddTuple(), PQclear(), PQcopyResult(), pqResultAlloc(), res, pg_conn::result, pg_result::resultStatus, pg_conn::rowBuf, pg_conn::singleRowMode, val, value, and pgresAttValue::value.
Referenced by getAnotherTuple().
void pqSaveErrorResult | ( | PGconn * | conn | ) |
Definition at line 800 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 1055 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 1076 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 817 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 2535 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 2522 of file fe-exec.c.
References conn, PqMsg_Close, PQsendTypedCommand(), and stmt.
Referenced by test_prepared().
int PQsendDescribePortal | ( | PGconn * | conn, |
const char * | portal | ||
) |
Definition at line 2470 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 2457 of file fe-exec.c.
References conn, PqMsg_Describe, PQsendTypedCommand(), and stmt.
Referenced by test_prepared().
int PQsendFlushRequest | ( | PGconn * | conn | ) |
Definition at line 3293 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, pqPutMsgEnd(), pqPutMsgStart(), and pg_conn::status.
Referenced by test_nosync(), test_pipeline_idle(), test_singlerowmode(), and test_uniqviol().
int PQsendPrepare | ( | PGconn * | conn, |
const char * | stmtName, | ||
const char * | query, | ||
int | nParams, | ||
const Oid * | paramTypes | ||
) |
Definition at line 1542 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 PQprepare(), prepare_foreign_modify(), test_pipelined_insert(), test_prepared(), and test_transaction().
int PQsendQuery | ( | PGconn * | conn, |
const char * | query | ||
) |
Definition at line 1422 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(), pgfdw_exec_cleanup_query_begin(), pgfdw_exec_query(), pgfdw_finish_pre_commit_cleanup(), PQexec(), 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 1428 of file fe-exec.c.
References conn, and PQsendQueryInternal().
Referenced by PQconnectPoll().
|
static |
Definition at line 1761 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 1434 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 1498 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(), PQexecParams(), 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 1639 of file fe-exec.c.
References conn, libpq_append_conn_error(), PQ_QUERY_PARAM_MAX_LIMIT, PQsendQueryGuts(), and PQsendQueryStart().
Referenced by execute_foreign_modify(), PQexecPrepared(), process_queued_fetch_requests(), sendCommand(), test_pipelined_insert(), test_transaction(), and test_uniqviol().
Definition at line 1679 of file fe-exec.c.
References pg_conn::asyncStatus, pg_conn::cmd_queue_head, conn, CONNECTION_OK, 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, pqClearAsyncResult(), pqClearConnErrorState, pg_conn::singleRowMode, and pg_conn::status.
Referenced by PQsendPrepare(), PQsendQueryInternal(), PQsendQueryParams(), PQsendQueryPrepared(), and PQsendTypedCommand().
|
static |
Definition at line 2555 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().