PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "access/xact.h"
#include "catalog/objectaccess.h"
#include "catalog/pg_proc.h"
#include "libpq/libpq.h"
#include "libpq/pqformat.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "port/pg_bswap.h"
#include "tcop/fastpath.h"
#include "tcop/tcopprot.h"
#include "utils/acl.h"
#include "utils/lsyscache.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | fp_info |
Functions | |
static int16 | parse_fcall_arguments (StringInfo msgBuf, struct fp_info *fip, FunctionCallInfo fcinfo) |
static int16 | parse_fcall_arguments_20 (StringInfo msgBuf, struct fp_info *fip, FunctionCallInfo fcinfo) |
int | GetOldFunctionMessage (StringInfo buf) |
static void | SendFunctionResult (Datum retval, bool isnull, Oid rettype, int16 format) |
static void | fetch_fp_info (Oid func_id, struct fp_info *fip) |
void | HandleFunctionRequest (StringInfo msgBuf) |
Definition at line 196 of file fastpath.c.
References fp_info::argtypes, Assert, elog, ereport, errcode(), errmsg(), ERROR, fp_info::flinfo, fmgr_info(), fp_info::fname, FUNC_MAX_ARGS, fp_info::funcid, GETSTRUCT, HeapTupleIsValid, InvalidOid, MemSet, NAMEDATALEN, NameStr, ObjectIdGetDatum, OidIsValid, PROCOID, ReleaseSysCache(), fp_info::rettype, SearchSysCache1(), and strlcpy().
Referenced by HandleFunctionRequest().
int GetOldFunctionMessage | ( | StringInfo | buf | ) |
Definition at line 77 of file fastpath.c.
References appendBinaryStringInfo(), StringInfoData::data, enlargeStringInfo(), ereport, errcode(), errmsg(), FATAL, StringInfoData::len, pg_ntoh32, pq_getbytes(), and pq_getstring().
Referenced by SocketBackend().
void HandleFunctionRequest | ( | StringInfo | msgBuf | ) |
Definition at line 259 of file fastpath.c.
References ACL_EXECUTE, ACL_USAGE, aclcheck_error(), ACLCHECK_OK, CHECK_FOR_INTERRUPTS, check_log_duration(), ereport, errcode(), errmsg(), ERROR, fetch_fp_info(), fp_info::flinfo, FmgrInfo::fn_strict, fp_info::fname, FrontendProtocol, FUNC_MAX_ARGS, FunctionCallInvoke, get_func_name(), get_namespace_name(), GetTransactionSnapshot(), GetUserId(), i, InitFunctionCallInfoData, InvalidOid, InvokeFunctionExecuteHook, InvokeNamespaceSearchHook, IsAbortedTransactionBlockState(), LOCAL_FCINFO, LOG, log_statement, LOGSTMT_ALL, OBJECT_FUNCTION, OBJECT_SCHEMA, parse_fcall_arguments(), parse_fcall_arguments_20(), pg_namespace_aclcheck(), pg_proc_aclcheck(), PG_PROTOCOL_MAJOR, PopActiveSnapshot(), pq_getmsgend(), pq_getmsgint(), pq_getmsgstring(), PushActiveSnapshot(), fp_info::rettype, and SendFunctionResult().
Referenced by PostgresMain().
|
static |
Definition at line 406 of file fastpath.c.
References appendBinaryStringInfo(), FunctionCallInfoBaseData::args, fp_info::argtypes, StringInfoData::cursor, StringInfoData::data, ereport, errcode(), errmsg(), ERROR, fp_info::flinfo, FmgrInfo::fn_nargs, FUNC_MAX_ARGS, getTypeBinaryInputInfo(), getTypeInputInfo(), i, initStringInfo(), NullableDatum::isnull, StringInfoData::len, FunctionCallInfoBaseData::nargs, OidInputFunctionCall(), OidReceiveFunctionCall(), palloc(), pfree(), pg_client_to_server(), pq_getmsgbytes(), pq_getmsgint(), resetStringInfo(), and NullableDatum::value.
Referenced by HandleFunctionRequest().
|
static |
Definition at line 544 of file fastpath.c.
References appendBinaryStringInfo(), FunctionCallInfoBaseData::args, fp_info::argtypes, StringInfoData::cursor, ereport, errcode(), errmsg(), ERROR, fp_info::flinfo, FmgrInfo::fn_nargs, FUNC_MAX_ARGS, getTypeBinaryInputInfo(), i, initStringInfo(), NullableDatum::isnull, StringInfoData::len, FunctionCallInfoBaseData::nargs, OidReceiveFunctionCall(), pq_getmsgbytes(), pq_getmsgint(), resetStringInfo(), and NullableDatum::value.
Referenced by HandleFunctionRequest().
Definition at line 136 of file fastpath.c.
References buf, ereport, errcode(), errmsg(), ERROR, FrontendProtocol, getTypeBinaryOutputInfo(), getTypeOutputInfo(), OidOutputFunctionCall(), OidSendFunctionCall(), pfree(), PG_PROTOCOL_MAJOR, pq_beginmessage(), pq_endmessage(), pq_sendbyte(), pq_sendbytes(), pq_sendcountedtext(), pq_sendint32(), VARDATA, VARHDRSZ, and VARSIZE.
Referenced by HandleFunctionRequest().