148 errmsg(
"cannot call function \"%s\" via fastpath interface",
153 elog(
ERROR,
"function %s has more than %d arguments",
156 fip->namespace =
pp->pronamespace;
157 fip->rettype =
pp->prorettype;
208 errmsg(
"current transaction is aborted, "
209 "commands ignored until end of transaction block")));
233 (
errmsg(
"fastpath function call: \"%s\" (OID %u)",
272 if (
fip->flinfo.fn_strict)
276 for (
i = 0;
i < fcinfo->nargs;
i++)
278 if (fcinfo->args[
i].isnull)
293 fcinfo->isnull =
true;
316 (
errmsg(
"duration: %s ms fastpath function call: \"%s\" (OID %u)",
352 errmsg(
"function call message contains %d arguments but function requires %d",
353 nargs,
fip->flinfo.fn_nargs)));
355 fcinfo->
nargs = nargs;
360 errmsg(
"function call message contains %d argument formats but %d arguments",
368 for (
i = 0;
i < nargs; ++
i)
384 errmsg(
"invalid argument size %d in function call message",
447 errmsg(
"incorrect binary data format in function argument %d",
void aclcheck_error(AclResult aclerr, ObjectType objtype, const char *objectname)
AclResult object_aclcheck(Oid classid, Oid objectid, Oid roleid, AclMode mode)
#define Assert(condition)
#define MemSet(start, val, len)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
static void fetch_fp_info(Oid func_id, struct fp_info *fip)
static int16 parse_fcall_arguments(StringInfo msgBuf, struct fp_info *fip, FunctionCallInfo fcinfo)
static void SendFunctionResult(Datum retval, bool isnull, Oid rettype, int16 format)
void HandleFunctionRequest(StringInfo msgBuf)
Datum OidReceiveFunctionCall(Oid functionId, StringInfo buf, Oid typioparam, int32 typmod)
void fmgr_info(Oid functionId, FmgrInfo *finfo)
Datum OidInputFunctionCall(Oid functionId, char *str, Oid typioparam, int32 typmod)
char * OidOutputFunctionCall(Oid functionId, Datum val)
bytea * OidSendFunctionCall(Oid functionId, Datum val)
#define InitFunctionCallInfoData(Fcinfo, Flinfo, Nargs, Collation, Context, Resultinfo)
#define LOCAL_FCINFO(name, nargs)
#define FunctionCallInvoke(fcinfo)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
void getTypeBinaryOutputInfo(Oid type, Oid *typSend, bool *typIsVarlena)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
void getTypeInputInfo(Oid type, Oid *typInput, Oid *typIOParam)
char * get_func_name(Oid funcid)
char * get_namespace_name(Oid nspid)
void getTypeBinaryInputInfo(Oid type, Oid *typReceive, Oid *typIOParam)
char * pg_client_to_server(const char *s, int len)
void pfree(void *pointer)
#define CHECK_FOR_INTERRUPTS()
#define InvokeNamespaceSearchHook(objectId, ereport_on_violation)
#define InvokeFunctionExecuteHook(objectId)
FormData_pg_proc * Form_pg_proc
static char buf[DEFAULT_XLOG_SEG_SIZE]
size_t strlcpy(char *dst, const char *src, size_t siz)
int check_log_duration(char *msec_str, bool was_logged)
static Datum ObjectIdGetDatum(Oid X)
#define PqMsg_FunctionCallResponse
Snapshot GetTransactionSnapshot(void)
void PushActiveSnapshot(Snapshot snapshot)
void PopActiveSnapshot(void)
void resetStringInfo(StringInfo str)
void appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
void initStringInfo(StringInfo str)
NullableDatum args[FLEXIBLE_ARRAY_MEMBER]
Oid argtypes[FUNC_MAX_ARGS]
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
static Size VARSIZE(const void *PTR)
static char * VARDATA(const void *PTR)
bool IsAbortedTransactionBlockState(void)