25#include "utils/fmgrprotos.h"
110 Oid result_typioparam;
119 elog(
ERROR,
"cache lookup failed for function %u",
120 fcinfo->flinfo->fn_oid);
130 elog(
ERROR,
"could not find source text of function \"%s\"",
134 (
errmsg(
"source text of function \"%s\": %s",
142 "PL/Sample function",
152 for (
int i = 0;
i < numargs;
i++)
159 elog(
ERROR,
"cache lookup failed for type %u", argtype);
167 (
errmsg(
"argument: %d; name: %s; value: %s",
189 elog(
ERROR,
"cache lookup failed for type %u", prorettype);
221 elog(
ERROR,
"not called by trigger manager");
233 elog(
ERROR,
"cache lookup failed for function %u",
234 fcinfo->flinfo->fn_oid);
246 elog(
ERROR,
"could not find source text of function \"%s\"",
250 (
errmsg(
"source text of function \"%s\": %s",
340 (
errmsg(
"trigger arg[%i]: %s",
i,
#define TextDatumGetCString(d)
#define PG_USED_FOR_ASSERTS_ONLY
#define Assert(condition)
#define ereport(elevel,...)
#define CALLED_AS_EVENT_TRIGGER(fcinfo)
Datum InputFunctionCall(FmgrInfo *flinfo, char *str, Oid typioparam, int32 typmod)
void fmgr_info_cxt(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt)
char * OutputFunctionCall(FmgrInfo *flinfo, Datum val)
#define PG_FUNCTION_INFO_V1(funcname)
#define PG_RETURN_DATUM(x)
int get_func_arg_info(HeapTuple procTup, Oid **p_argtypes, char ***p_argnames, char **p_argmodes)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
Oid getTypeIOParam(HeapTuple typeTuple)
char * pstrdup(const char *in)
void * palloc0(Size size)
MemoryContext TopMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_SMALL_SIZES
END_CATALOG_STRUCT typedef FormData_pg_proc * Form_pg_proc
static rewind_source * source
END_CATALOG_STRUCT typedef FormData_pg_type * Form_pg_type
static Datum plsample_func_handler(PG_FUNCTION_ARGS)
Datum plsample_call_handler(PG_FUNCTION_ARGS)
static HeapTuple plsample_trigger_handler(PG_FUNCTION_ARGS)
static Datum ObjectIdGetDatum(Oid X)
#define PointerGetDatum(X)
int SPI_register_trigger_data(TriggerData *tdata)
char * SPI_getnspname(Relation rel)
char * SPI_getrelname(Relation rel)
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
Datum SysCacheGetAttr(SysCacheIdentifier cacheId, HeapTuple tup, AttrNumber attributeNumber, bool *isNull)
#define TRIGGER_FIRED_FOR_STATEMENT(event)
#define TRIGGER_FIRED_BY_DELETE(event)
#define TRIGGER_FIRED_BEFORE(event)
#define CALLED_AS_TRIGGER(fcinfo)
#define TRIGGER_FIRED_FOR_ROW(event)
#define TRIGGER_FIRED_AFTER(event)
#define TRIGGER_FIRED_BY_TRUNCATE(event)
#define TRIGGER_FIRED_BY_INSERT(event)
#define TRIGGER_FIRED_BY_UPDATE(event)
#define TRIGGER_FIRED_INSTEAD(event)