43#include "utils/fmgroids.h"
127#define get_eval_mcontext(estate) \
128 ((estate)->eval_econtext->ecxt_per_tuple_memory)
129#define eval_mcontext_alloc(estate, sz) \
130 MemoryContextAlloc(get_eval_mcontext(estate), sz)
131#define eval_mcontext_alloc0(estate, sz) \
132 MemoryContextAllocZero(get_eval_mcontext(estate), sz)
204#define LOOP_RC_PROCESSING(looplabel, exit_action) \
205 if (rc == PLPGSQL_RC_RETURN) \
210 else if (rc == PLPGSQL_RC_EXIT) \
212 if (estate->exitlabel == NULL) \
215 rc = PLPGSQL_RC_OK; \
218 else if ((looplabel) != NULL && \
219 strcmp(looplabel, estate->exitlabel) == 0) \
222 estate->exitlabel = NULL; \
223 rc = PLPGSQL_RC_OK; \
232 else if (rc == PLPGSQL_RC_CONTINUE) \
234 if (estate->exitlabel == NULL) \
237 rc = PLPGSQL_RC_OK; \
239 else if ((looplabel) != NULL && \
240 strcmp(looplabel, estate->exitlabel) == 0) \
243 estate->exitlabel = NULL; \
244 rc = PLPGSQL_RC_OK; \
253 Assert(rc == PLPGSQL_RC_OK)
340 EState *simple_eval_estate,
464 const char *portalname,
int cursorOptions);
494 EState *simple_eval_estate,
508 simple_eval_estate, simple_eval_resowner);
629 ((*plpgsql_plugin_ptr)->func_beg) (&estate, func);
641 errmsg(
"control reached end of function without RETURN")));
659 errmsg(
"set-valued function called in context that cannot accept a set")));
664 errmsg(
"materialize mode required, but it is not allowed in this context")));
746 elog(
ERROR,
"return type must be a row type");
797 ((*plpgsql_plugin_ptr)->func_end) (&estate, func);
846 gettext_noop(
"returned record type does not match expected record type"));
910 gettext_noop(
"returned record type does not match expected record type"));
1015 for (
int i = 0;
i < tupdesc->
natts;
i++)
1030 elog(
ERROR,
"unrecognized trigger action: not INSERT, DELETE, or UPDATE");
1047 ((*plpgsql_plugin_ptr)->func_beg) (&estate, func);
1059 errmsg(
"control reached end of trigger procedure without RETURN")));
1067 errmsg(
"trigger procedure cannot return a set")));
1106 gettext_noop(
"returned row structure does not match the structure of the triggering table"));
1134 gettext_noop(
"returned row structure does not match the structure of the triggering table"));
1151 ((*plpgsql_plugin_ptr)->func_end) (&estate, func);
1205 ((*plpgsql_plugin_ptr)->func_beg) (&estate, func);
1217 errmsg(
"control reached end of trigger procedure without RETURN")));
1226 ((*plpgsql_plugin_ptr)->func_end) (&estate, func);
1275 errcontext(
"PL/pgSQL function %s line %d %s",
1294 errcontext(
"PL/pgSQL function %s line %d at %s",
1313 int ndatums = estate->
ndatums;
1333 for (
i = 0;
i < ndatums;
i++)
1404 elog(
ERROR,
"trigger promise is not in a trigger function");
1413 elog(
ERROR,
"trigger promise is not in a trigger function");
1421 elog(
ERROR,
"unrecognized trigger execution time: not BEFORE, AFTER, or INSTEAD OF");
1426 elog(
ERROR,
"trigger promise is not in a trigger function");
1432 elog(
ERROR,
"unrecognized trigger event type: not ROW or STATEMENT");
1437 elog(
ERROR,
"trigger promise is not in a trigger function");
1447 elog(
ERROR,
"unrecognized trigger action: not INSERT, DELETE, UPDATE, or TRUNCATE");
1452 elog(
ERROR,
"trigger promise is not in a trigger function");
1460 elog(
ERROR,
"trigger promise is not in a trigger function");
1469 elog(
ERROR,
"trigger promise is not in a trigger function");
1478 elog(
ERROR,
"trigger promise is not in a trigger function");
1486 elog(
ERROR,
"trigger promise is not in a trigger function");
1500 for (
i = 0;
i < nelems;
i++)
1520 elog(
ERROR,
"event trigger promise is not in an event trigger function");
1526 elog(
ERROR,
"event trigger promise is not in an event trigger function");
1549 "PLpgSQL per-statement data",
1596 for (; cond !=
NULL; cond = cond->
next)
1612 else if (
edata->sqlerrcode == sqlerrstate)
1641 ((*plpgsql_plugin_ptr)->stmt_beg) (estate, (
PLpgSQL_stmt *) block);
1649 ((*plpgsql_plugin_ptr)->stmt_end) (estate, (
PLpgSQL_stmt *) block);
1664 volatile int rc = -1;
1689 switch (datum->
dtype)
2020 ((*plpgsql_plugin_ptr)->stmt_beg) (estate,
stmt);
2024 switch (
stmt->cmd_type)
2143 ((*plpgsql_plugin_ptr)->stmt_end) (estate,
stmt);
2238 options.allow_nonatomic =
true;
2244 elog(
ERROR,
"SPI_execute_plan_extended failed executing query \"%s\": %s",
2269 elog(
ERROR,
"DO statement returned a row");
2274 elog(
ERROR,
"procedure call returned more than one row");
2314 elog(
ERROR,
"query for CALL statement is not a CallStmt");
2318 elog(
ERROR,
"query for CALL statement is not a CallStmt");
2320 funcexpr =
stmt->funcexpr;
2325 elog(
ERROR,
"cache lookup failed for function %u",
2344 row->
refname =
"(unnamed row)";
2356 for (
i = 0;
i < numargs;
i++)
2373 row->
varnos[nfields++] = dno;
2378 if (argnames && argnames[
i] && argnames[
i][0])
2381 errmsg(
"procedure parameter \"%s\" is an output parameter but corresponding argument is not writable",
2386 errmsg(
"procedure parameter %d is an output parameter but corresponding argument is not writable",
2422 errmsg(
"GET STACKED DIAGNOSTICS cannot be used outside an exception handler")));
2424 foreach(
lc,
stmt->diag_items)
2508 elog(
ERROR,
"unrecognized diagnostic item kind: %d",
2533 if (!isnull &&
value)
2536 foreach(
lc,
stmt->elsif_list)
2542 if (!isnull &&
value)
2600 foreach(l,
stmt->case_when_list)
2607 if (!isnull &&
value)
2625 if (!
stmt->have_else)
2628 errmsg(
"case not found"),
2629 errhint(
"CASE statement is missing ELSE part.")));
2676 if (isnull || !
value)
2722 errmsg(
"lower bound of FOR loop cannot be null")));
2738 errmsg(
"upper bound of FOR loop cannot be null")));
2756 errmsg(
"BY value of FOR loop cannot be null")));
2762 errmsg(
"BY value of FOR loop must be greater than zero")));
2919 errmsg(
"arguments given for cursor without arguments")));
2931 elog(
ERROR,
"open cursor failed during argument processing");
2938 errmsg(
"arguments required for cursor")));
2959 elog(
ERROR,
"could not open cursor: %s",
3029 errmsg(
"FOREACH expression must not be null")));
3044 errmsg(
"FOREACH expression must yield an array, not type %s",
3061 errmsg(
"slice dimension (%d) is out of the valid range 0..%d",
3088 errmsg(
"FOREACH ... SLICE loop variable must be of an array type")));
3092 errmsg(
"FOREACH loop variable must not be of an array type")));
3098 if (
stmt->slice > 0)
3124 if (
stmt->slice > 0)
3175 if (isnull ||
value ==
false)
3223 if (
stmt->retvarno >= 0)
3254 errmsg(
"cannot return non-composite value from function returning composite type")));
3297 errmsg(
"cannot return non-composite value from function returning composite type")));
3336 errmsg(
"cannot use RETURN NEXT in a non-SETOF function")));
3343 natts = tupdesc->
natts;
3355 if (
stmt->retvarno >= 0)
3371 bool isNull = var->
isnull;
3377 errmsg(
"wrong result type supplied in RETURN NEXT")));
3415 gettext_noop(
"wrong record type supplied in RETURN NEXT"));
3436 errmsg(
"wrong record type supplied in RETURN NEXT")));
3447 else if (
stmt->expr)
3472 errmsg(
"cannot return non-composite value from function returning composite type")));
3479 gettext_noop(
"returned record type does not match expected record type"));
3509 errmsg(
"wrong result type supplied in RETURN NEXT")));
3528 errmsg(
"RETURN NEXT must have a parameter")));
3556 errmsg(
"cannot use RETURN QUERY in a non-SETOF function")));
3574 gettext_noop(
"structure of query does not match function result type"));
3601 options.must_return_tuples =
true;
3606 elog(
ERROR,
"SPI_execute_plan_extended failed executing query \"%s\": %s",
3629 errmsg(
"query string argument of EXECUTE is null")));
3644 options.must_return_tuples =
true;
3649 elog(
ERROR,
"SPI_execute_extended failed executing query \"%s\": %s",
3680 errmsg(
"set-valued function called in context that cannot accept a set")));
3686 errmsg(
"materialize mode required, but it is not allowed in this context")));
3709#define SET_RAISE_OPTION_TEXT(opt, name) \
3713 (errcode(ERRCODE_SYNTAX_ERROR), \
3714 errmsg("RAISE option already specified: %s", \
3716 opt = MemoryContextStrdup(stmt_mcontext, extval); \
3727 char *condname =
NULL;
3748 errmsg(
"RAISE without parameters cannot be used outside an exception handler")));
3797 elog(
ERROR,
"unexpected RAISE parameter list length");
3821 elog(
ERROR,
"unexpected RAISE parameter list length");
3826 foreach(
lc,
stmt->options)
3842 errmsg(
"RAISE statement option cannot be null")));
3852 errmsg(
"RAISE option already specified: %s",
3947 if (isnull || !
value)
3949 char *message =
NULL;
3958 &isnull, &
typeid, &typmod);
3967 errmsg(
"assertion failed")));
3981 EState *simple_eval_estate,
3989 estate->
func = func;
4049 if (simple_eval_estate)
4077 if (simple_eval_resowner)
4122 if ((*plpgsql_plugin_ptr)->func_setup)
4123 ((*plpgsql_plugin_ptr)->func_setup) (estate, func);
4183 options.parserSetupArg = expr;
4185 options.cursorOptions = cursorOptions;
4188 elog(
ERROR,
"SPI_prepare_extended failed for \"%s\": %s",
4228 if (!
stmt->mod_stmt_set)
4232 stmt->mod_stmt =
false;
4249 stmt->mod_stmt =
true;
4253 stmt->mod_stmt_set =
true;
4333 errmsg(
"cannot COPY to/from client in PL/pgSQL")));
4339 errmsg(
"unsupported transaction command in PL/pgSQL")));
4343 elog(
ERROR,
"SPI_execute_plan_with_paramlist failed executing query \"%s\": %s",
4362 errmsg(
"INTO used with a command that cannot return data")));
4385 errmsg(
"query returned no rows"),
4407 errmsg(
"query returned more than one row"),
4409 errhint(
"Make sure the query returns a single row, or use LIMIT 1.")));
4425 errmsg(
"query has no destination for result data"),
4426 (rc ==
SPI_OK_SELECT) ?
errhint(
"If you want to discard the results of a SELECT, use PERFORM instead.") : 0));
4460 errmsg(
"query string argument of EXECUTE is null")));
4515 errmsg(
"EXECUTE of SELECT ... INTO is not implemented"),
4516 errhint(
"You might want to use EXECUTE ... INTO or EXECUTE CREATE TABLE ... AS instead.")));
4523 errmsg(
"cannot COPY to/from client in PL/pgSQL")));
4529 errmsg(
"EXECUTE of transaction commands is not implemented")));
4533 elog(
ERROR,
"SPI_execute_extended failed executing query \"%s\": %s",
4552 errmsg(
"INTO used with a command that cannot return data")));
4575 errmsg(
"query returned no rows"),
4583 if (n > 1 &&
stmt->strict)
4594 errmsg(
"query returned more than one row"),
4714 stmt->cursor_options);
4754 errmsg(
"arguments given for cursor without arguments")));
4766 elog(
ERROR,
"open cursor failed during argument processing");
4773 errmsg(
"arguments required for cursor")));
4793 elog(
ERROR,
"could not open cursor: %s",
4824 long how_many =
stmt->how_many;
4839 errmsg(
"cursor variable \"%s\" is null", curvar->
refname)));
4863 errmsg(
"relative or absolute cursor position is null")));
4927 errmsg(
"cursor variable \"%s\" is null", curvar->
refname)));
5065 switch (target->
dtype)
5087 errmsg(
"null value cannot be assigned to variable \"%s\" declared NOT NULL",
5163 errmsg(
"cannot assign non-composite value to a row variable")));
5182 errmsg(
"null value cannot be assigned to variable \"%s\" declared NOT NULL",
5195 errmsg(
"cannot assign non-composite value to a record variable")));
5237 errmsg(
"record \"%s\" has no field \"%s\"",
5246 errmsg(
"cannot assign to system column \"%s\"",
5296 switch (datum->
dtype)
5322 elog(
ERROR,
"row variable has no tupdesc");
5328 elog(
ERROR,
"row not compatible with its own tupdesc");
5410 errmsg(
"record \"%s\" has no field \"%s\"",
5443 switch (datum->
dtype)
5497 errmsg(
"record \"%s\" has no field \"%s\"",
5527 switch (datum->
dtype)
5588 errmsg(
"record \"%s\" has no field \"%s\"",
5595 *collation =
recfield->finfo.fcollation;
5695 errmsg(
"query did not return data"),
5705 "query returned %d columns",
5714 *rettype = attr->atttypid;
5732 errmsg(
"query returned more than one row"),
5792 elog(
ERROR,
"could not open implicit cursor for query \"%s\": %s",
5812 errmsg(
"query is SELECT INTO, but it should be plain SELECT"),
5817 errmsg(
"query is not a SELECT"),
5895 for (
i = 0;
i < n;
i++)
6318 datum = estate->
datums[dno];
6336 switch (datum->
dtype)
6399 &
prm->value, &
prm->isnull);
6443 datum = estate->
datums[dno];
6479 if (((
PLpgSQL_var *) datum)->datatype->typlen == -1)
6497 scratch.d.cparam.paramarg = expr;
6498 scratch.d.cparam.paramarg2 = param;
6785 errmsg(
"record \"%s\" has no field \"%s\"",
6799 errmsg(
"type of parameter %d (%s) does not match that when preparing the plan (%s)",
6828 datum = estate->
datums[dno];
6839 errmsg(
"type of parameter %d (%s) does not match that when preparing the plan (%s)",
6868 datum = estate->
datums[dno];
6879 errmsg(
"type of parameter %d (%s) does not match that when preparing the plan (%s)",
6921 if (tupdesc ==
NULL)
7046 typ->tcache->tupDesc_identifier ==
typ->tupdesc_id)
7086 errmsg(
"type %s is not composite",
7094 typ->tcache = typentry;
7195 if (tupdesc !=
NULL)
7260 if (attr->attisdropped)
7273 isnull = nulls[
anum];
7290 errmsg(
"number of source and target fields in assignment does not match"),
7293 "strict_multi_assignment",
7296 errhint(
"Make sure the query returns the exact list of columns.")));
7324 errmsg(
"number of source and target fields in assignment does not match"),
7327 "strict_multi_assignment",
7330 errhint(
"Make sure the query returns the exact list of columns.")));
7382 isnull = nulls[
anum];
7398 errmsg(
"number of source and target fields in assignment does not match"),
7401 "strict_multi_assignment",
7404 errhint(
"Make sure the query returns the exact list of columns.")));
7424 errmsg(
"number of source and target fields in assignment does not match"),
7427 "strict_multi_assignment",
7430 errhint(
"Make sure the query returns the exact list of columns.")));
7459 if (
dattr->attisdropped !=
sattr->attisdropped)
7461 if (!
dattr->attisdropped)
7465 (
dattr->atttypmod >= 0 &&
7494 int natts = tupdesc->
natts;
7506 for (
i = 0;
i < natts;
i++)
7519 &dvalues[
i], &nulls[
i]);
7600 if (erh == rec->
erh)
7818 errdetail(
"The tuple structure of a not-yet-assigned record is indeterminate.")));
8049 if (cast_expr ==
NULL)
8058 cast_expr = (
Node *) iocoerce;
8059 if (dsttypmod != -1)
8072 cast_expr = cast_cexpr->
expr;
8241 if (query->hasAggs ||
8242 query->hasWindowFuncs ||
8243 query->hasTargetSRFs ||
8244 query->hasSubLinks ||
8332 elog(
ERROR,
"unexpected plan node type: %d",
8437 if (context.
count == 1)
8467 funcid = opexpr->opfuncid;
8499 req.funcid = funcid;
8542 if (++(context->
count) > 1)
8562 datum = estate->
datums[dno];
8563 switch (datum->
dtype)
8571 errmsg(
"variable \"%s\" is declared CONSTANT",
8656 "PL/pgSQL simple expressions");
8930 else if (!
prm->isnull)
8962 const char *portalname,
8982 errmsg(
"query string argument of EXECUTE is null")));
8999 options.cursorOptions = cursorOptions;
9005 elog(
ERROR,
"could not open implicit cursor for query \"%s\": %s",
9051 paramno > 0 ?
", " :
"",
9090 for (paramno = 0; paramno < paramLI->
numParams; paramno++)
9100 paramno > 0 ?
", " :
"",
static bool array_iterator(ArrayType *la, PGCALL2 callback, void *param, ltree **found)
#define DatumGetArrayTypePCopy(X)
Datum expand_array(Datum arraydatum, MemoryContext parentcontext, ArrayMetaState *metacache)
bool array_iterate(ArrayIterator iterator, Datum *value, bool *isnull)
ArrayIterator array_create_iterator(ArrayType *arr, int slice_ndim, ArrayMetaState *mstate)
ArrayType * construct_md_array(Datum *elems, bool *nulls, int ndims, int *dims, int *lbs, Oid elmtype, int elmlen, bool elmbyval, char elmalign)
int bms_next_member(const Bitmapset *a, int prevbit)
bool bms_is_member(int x, const Bitmapset *a)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
#define TextDatumGetCString(d)
#define Assert(condition)
uint32 LocalTransactionId
#define OidIsValid(objectId)
bool contain_mutable_functions(Node *clause)
const char * GetCommandTagName(CommandTag commandTag)
Datum datumCopy(Datum value, bool typByVal, int typLen)
Datum datumTransfer(Datum value, bool typByVal, int typLen)
DestReceiver * CreateDestReceiver(CommandDest dest)
varlena * detoast_external_attr(varlena *attr)
void domain_check(Datum value, bool isnull, Oid domainType, void **extra, MemoryContext mcxt)
void * hash_search(HTAB *hashp, const void *keyPtr, HASHACTION action, bool *foundPtr)
HTAB * hash_create(const char *tabname, int64 nelem, const HASHCTL *info, int flags)
char * GetErrorContextStack(void)
ErrorContextCallback * error_context_stack
void ReThrowError(ErrorData *edata)
ErrorData * CopyErrorData(void)
void FlushErrorState(void)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
char * unpack_sql_state(int sql_state)
#define ERRCODE_IS_CATEGORY(ec)
int err_generic_string(int field, const char *str)
int int errdetail_internal(const char *fmt,...) pg_attribute_printf(1
int errhint(const char *fmt,...) pg_attribute_printf(1
int errdetail(const char *fmt,...) pg_attribute_printf(1
int int errmsg_internal(const char *fmt,...) pg_attribute_printf(1
int int int errmsg_plural(const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(1
#define ERRCODE_TO_CATEGORY(ec)
#define ereport(elevel,...)
ExprState * ExecInitExpr(Expr *node, PlanState *parent)
void ExprEvalPushStep(ExprState *es, const ExprEvalStep *s)
ExprState * ExecInitExprWithParams(Expr *node, ParamListInfo ext_params)
TupleDesc BlessTupleDesc(TupleDesc tupdesc)
ExprContext * CreateExprContext(EState *estate)
void FreeExprContext(ExprContext *econtext, bool isCommit)
void FreeExecutorState(EState *estate)
EState * CreateExecutorState(void)
@ SFRM_Materialize_Random
#define ResetExprContext(econtext)
static Datum ExecEvalExpr(ExprState *state, ExprContext *econtext, bool *isNull)
ExpandedObjectHeader * DatumGetEOHP(Datum d)
void EOH_flatten_into(ExpandedObjectHeader *eohptr, void *result, Size allocated_size)
void DeleteExpandedObject(Datum d)
Datum TransferExpandedObject(Datum d, MemoryContext new_parent)
Size EOH_get_flat_size(ExpandedObjectHeader *eohptr)
#define MakeExpandedObjectReadOnly(d, isnull, typlen)
#define DatumIsReadWriteExpandedObject(d, isnull, typlen)
ExpandedRecordHeader * make_expanded_record_from_exprecord(ExpandedRecordHeader *olderh, MemoryContext parentcontext)
ExpandedRecordHeader * make_expanded_record_from_tupdesc(TupleDesc tupdesc, MemoryContext parentcontext)
void expanded_record_set_field_internal(ExpandedRecordHeader *erh, int fnumber, Datum newValue, bool isnull, bool expand_external, bool check_constraints)
bool expanded_record_lookup_field(ExpandedRecordHeader *erh, const char *fieldname, ExpandedRecordFieldInfo *finfo)
ExpandedRecordHeader * make_expanded_record_from_typeid(Oid type_id, int32 typmod, MemoryContext parentcontext)
void expanded_record_set_tuple(ExpandedRecordHeader *erh, HeapTuple tuple, bool copy, bool expand_external)
HeapTuple expanded_record_get_tuple(ExpandedRecordHeader *erh)
void deconstruct_expanded_record(ExpandedRecordHeader *erh)
void expanded_record_set_fields(ExpandedRecordHeader *erh, const Datum *newValues, const bool *isnulls, bool expand_external)
#define expanded_record_set_field(erh, fnumber, newValue, isnull, expand_external)
#define ExpandedRecordIsEmpty(erh)
static Datum ExpandedRecordGetDatum(const ExpandedRecordHeader *erh)
static Datum expanded_record_get_field(ExpandedRecordHeader *erh, int fnumber, bool *isnull)
#define ExpandedRecordIsDomain(erh)
static TupleDesc expanded_record_get_tupdesc(ExpandedRecordHeader *erh)
#define ER_FLAG_FVALUE_VALID
#define TransferExpandedRecord(erh, cxt)
#define palloc_array(type, count)
#define palloc0_object(type)
char * OidOutputFunctionCall(Oid functionId, Datum val)
#define OidFunctionCall1(functionId, arg1)
#define DatumGetHeapTupleHeader(X)
#define DirectFunctionCall1(func, arg1)
int get_func_arg_info(HeapTuple procTup, Oid **p_argtypes, char ***p_argnames, char **p_argmodes)
TypeFuncClass get_call_result_type(FunctionCallInfo fcinfo, Oid *resultTypeId, TupleDesc *resultTupleDesc)
@ TYPEFUNC_COMPOSITE_DOMAIN
static Datum HeapTupleGetDatum(const HeapTupleData *tuple)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
void heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc, Datum *values, bool *isnull)
HeapTupleHeaderData * HeapTupleHeader
#define HeapTupleIsValid(tuple)
static void HeapTupleHeaderSetTypMod(HeapTupleHeaderData *tup, int32 typmod)
static int32 HeapTupleHeaderGetTypMod(const HeapTupleHeaderData *tup)
static void HeapTupleHeaderSetTypeId(HeapTupleHeaderData *tup, Oid datum_typeid)
static uint32 HeapTupleHeaderGetDatumLength(const HeapTupleHeaderData *tup)
static Oid HeapTupleHeaderGetTypeId(const HeapTupleHeaderData *tup)
static void ItemPointerSetInvalid(ItemPointerData *pointer)
#define InvalidLocalTransactionId
Oid get_element_type(Oid typid)
bool type_is_rowtype(Oid typid)
RegProcedure get_func_support(Oid funcid)
void getTypeOutputInfo(Oid type, Oid *typOutput, bool *typIsVarlena)
void get_typlenbyval(Oid typid, int16 *typlen, bool *typbyval)
Oid get_typcollation(Oid typid)
char * get_namespace_name(Oid nspid)
RegProcedure get_typsubscript(Oid typid, Oid *typelemp)
char * MemoryContextStrdup(MemoryContext context, const char *string)
void * MemoryContextAlloc(MemoryContext context, Size size)
void MemoryContextReset(MemoryContext context)
MemoryContext TopTransactionContext
void pfree(void *pointer)
void MemoryContextDeleteChildren(MemoryContext context)
MemoryContext CurrentMemoryContext
MemoryContext MemoryContextGetParent(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
#define CHECK_FOR_INTERRUPTS()
Datum namein(PG_FUNCTION_ARGS)
Oid exprType(const Node *expr)
int32 exprTypmod(const Node *expr)
#define expression_tree_walker(n, w, c)
#define IsA(nodeptr, _type_)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
ParamListInfo makeParamList(int numParams)
void(* ParserSetupHook)(ParseState *pstate, void *arg)
Node * coerce_to_target_type(ParseState *pstate, Node *expr, Oid exprtype, Oid targettype, int32 targettypmod, CoercionContext ccontext, CoercionForm cformat, int location)
void typenameTypeIdAndMod(ParseState *pstate, const TypeName *typeName, Oid *typeid_p, int32 *typmod_p)
#define CURSOR_OPT_PARALLEL_OK
#define CURSOR_OPT_NO_SCROLL
FormData_pg_attribute * Form_pg_attribute
static int list_length(const List *l)
#define linitial_node(type, l)
static void * list_nth(const List *list, int n)
static ListCell * list_head(const List *l)
static ListCell * lnext(const List *l, const ListCell *c)
#define list_make2(x1, x2)
void plpgsql_parser_setup(struct ParseState *pstate, PLpgSQL_expr *expr)
int plpgsql_recognize_err_condition(const char *condname, bool allow_sqlstate)
PLpgSQL_type * plpgsql_build_datatype(Oid typeOid, int32 typmod, Oid collation, TypeName *origtypname)
static void coerce_function_result_tuple(PLpgSQL_execstate *estate, TupleDesc tupdesc)
static void exec_simple_check_plan(PLpgSQL_execstate *estate, PLpgSQL_expr *expr)
static int exec_stmt_fors(PLpgSQL_execstate *estate, PLpgSQL_stmt_fors *stmt)
static int exec_stmt_fetch(PLpgSQL_execstate *estate, PLpgSQL_stmt_fetch *stmt)
#define eval_mcontext_alloc(estate, sz)
static void plpgsql_fulfill_promise(PLpgSQL_execstate *estate, PLpgSQL_var *var)
static ParamExternData * plpgsql_param_fetch(ParamListInfo params, int paramid, bool speculative, ParamExternData *prm)
static void exec_init_tuple_store(PLpgSQL_execstate *estate)
static void plpgsql_param_eval_var_ro(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static int exec_for_query(PLpgSQL_execstate *estate, PLpgSQL_stmt_forq *stmt, Portal portal, bool prefetch_ok)
static ResourceOwner shared_simple_eval_resowner
static int exec_stmt_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
static int exec_stmt_commit(PLpgSQL_execstate *estate, PLpgSQL_stmt_commit *stmt)
static void plpgsql_create_econtext(PLpgSQL_execstate *estate)
#define get_eval_mcontext(estate)
static void assign_record_var(PLpgSQL_execstate *estate, PLpgSQL_rec *rec, ExpandedRecordHeader *erh)
static int exec_eval_integer(PLpgSQL_execstate *estate, PLpgSQL_expr *expr, bool *isNull)
static int exec_stmt_forc(PLpgSQL_execstate *estate, PLpgSQL_stmt_forc *stmt)
#define SET_RAISE_OPTION_TEXT(opt, name)
static int exec_stmt_execsql(PLpgSQL_execstate *estate, PLpgSQL_stmt_execsql *stmt)
static char * format_expr_params(PLpgSQL_execstate *estate, const PLpgSQL_expr *expr)
static void exec_eval_cleanup(PLpgSQL_execstate *estate)
static int exec_stmt_foreach_a(PLpgSQL_execstate *estate, PLpgSQL_stmt_foreach_a *stmt)
static int exec_stmt_rollback(PLpgSQL_execstate *estate, PLpgSQL_stmt_rollback *stmt)
Datum plpgsql_exec_function(PLpgSQL_function *func, FunctionCallInfo fcinfo, EState *simple_eval_estate, ResourceOwner simple_eval_resowner, ResourceOwner procedure_resowner, bool atomic)
static EState * shared_simple_eval_estate
static void revalidate_rectypeid(PLpgSQL_rec *rec)
static HTAB * shared_cast_hash
static void plpgsql_exec_error_callback(void *arg)
static void plpgsql_estate_setup(PLpgSQL_execstate *estate, PLpgSQL_function *func, ReturnSetInfo *rsi, EState *simple_eval_estate, ResourceOwner simple_eval_resowner)
static void plpgsql_param_compile(ParamListInfo params, Param *param, ExprState *state, Datum *resv, bool *resnull)
#define LOOP_RC_PROCESSING(looplabel, exit_action)
static void exec_move_row_from_datum(PLpgSQL_execstate *estate, PLpgSQL_variable *target, Datum value)
static void exec_assign_value(PLpgSQL_execstate *estate, PLpgSQL_datum *target, Datum value, bool isNull, Oid valtype, int32 valtypmod)
static bool exception_matches_conditions(ErrorData *edata, PLpgSQL_condition *cond)
static void exec_move_row_from_fields(PLpgSQL_execstate *estate, PLpgSQL_variable *target, ExpandedRecordHeader *newerh, Datum *values, bool *nulls, TupleDesc tupdesc)
static void exec_prepare_plan(PLpgSQL_execstate *estate, PLpgSQL_expr *expr, int cursorOptions)
static void exec_eval_datum(PLpgSQL_execstate *estate, PLpgSQL_datum *datum, Oid *typeid, int32 *typetypmod, Datum *value, bool *isnull)
static int exec_stmt_return(PLpgSQL_execstate *estate, PLpgSQL_stmt_return *stmt)
static void plpgsql_param_eval_recfield(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void plpgsql_param_eval_generic_ro(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static int exec_stmt_exit(PLpgSQL_execstate *estate, PLpgSQL_stmt_exit *stmt)
static void instantiate_empty_record_variable(PLpgSQL_execstate *estate, PLpgSQL_rec *rec)
void plpgsql_exec_get_datum_type_info(PLpgSQL_execstate *estate, PLpgSQL_datum *datum, Oid *typeId, int32 *typMod, Oid *collation)
static TupleDesc deconstruct_composite_datum(Datum value, HeapTupleData *tmptup)
static plpgsql_CastHashEntry * get_cast_hashentry(PLpgSQL_execstate *estate, Oid srctype, int32 srctypmod, Oid dsttype, int32 dsttypmod)
static int exec_stmt_raise(PLpgSQL_execstate *estate, PLpgSQL_stmt_raise *stmt)
static char * convert_value_to_string(PLpgSQL_execstate *estate, Datum value, Oid valtype)
static Datum do_cast_value(PLpgSQL_execstate *estate, Datum value, bool *isnull, Oid valtype, int32 valtypmod, Oid reqtype, int32 reqtypmod)
static Datum exec_cast_value(PLpgSQL_execstate *estate, Datum value, bool *isnull, Oid valtype, int32 valtypmod, Oid reqtype, int32 reqtypmod)
static ParamListInfo setup_param_list(PLpgSQL_execstate *estate, PLpgSQL_expr *expr)
static int exec_stmts(PLpgSQL_execstate *estate, List *stmts)
static int exec_stmt_loop(PLpgSQL_execstate *estate, PLpgSQL_stmt_loop *stmt)
static void assign_text_var(PLpgSQL_execstate *estate, PLpgSQL_var *var, const char *str)
static void exec_assign_c_string(PLpgSQL_execstate *estate, PLpgSQL_datum *target, const char *str)
static int exec_stmt_open(PLpgSQL_execstate *estate, PLpgSQL_stmt_open *stmt)
static void exec_set_found(PLpgSQL_execstate *estate, bool state)
static int exec_stmt_dynexecute(PLpgSQL_execstate *estate, PLpgSQL_stmt_dynexecute *stmt)
static bool compatible_tupdescs(TupleDesc src_tupdesc, TupleDesc dst_tupdesc)
static SimpleEcontextStackEntry * simple_econtext_stack
static void exec_save_simple_expr(PLpgSQL_expr *expr, CachedPlan *cplan)
static void plpgsql_param_eval_generic(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void exec_assign_expr(PLpgSQL_execstate *estate, PLpgSQL_datum *target, PLpgSQL_expr *expr)
static HTAB * cast_expr_hash
static void assign_simple_var(PLpgSQL_execstate *estate, PLpgSQL_var *var, Datum newvalue, bool isnull, bool freeable)
static int exec_stmt_assert(PLpgSQL_execstate *estate, PLpgSQL_stmt_assert *stmt)
static int exec_stmt_return_query(PLpgSQL_execstate *estate, PLpgSQL_stmt_return_query *stmt)
static void exec_move_row(PLpgSQL_execstate *estate, PLpgSQL_variable *target, HeapTuple tup, TupleDesc tupdesc)
static MemoryContext get_stmt_mcontext(PLpgSQL_execstate *estate)
static int exec_stmt_call(PLpgSQL_execstate *estate, PLpgSQL_stmt_call *stmt)
static ExpandedRecordHeader * make_expanded_record_for_rec(PLpgSQL_execstate *estate, PLpgSQL_rec *rec, TupleDesc srctupdesc, ExpandedRecordHeader *srcerh)
static int exec_stmt_fori(PLpgSQL_execstate *estate, PLpgSQL_stmt_fori *stmt)
static int exec_stmt_if(PLpgSQL_execstate *estate, PLpgSQL_stmt_if *stmt)
static int exec_toplevel_block(PLpgSQL_execstate *estate, PLpgSQL_stmt_block *block)
static int exec_stmt_case(PLpgSQL_execstate *estate, PLpgSQL_stmt_case *stmt)
static int exec_stmt_return_next(PLpgSQL_execstate *estate, PLpgSQL_stmt_return_next *stmt)
static void plpgsql_destroy_econtext(PLpgSQL_execstate *estate)
static int exec_stmt_assign(PLpgSQL_execstate *estate, PLpgSQL_stmt_assign *stmt)
HeapTuple plpgsql_exec_trigger(PLpgSQL_function *func, TriggerData *trigdata)
static int exec_stmt_dynfors(PLpgSQL_execstate *estate, PLpgSQL_stmt_dynfors *stmt)
#define eval_mcontext_alloc0(estate, sz)
static ParamListInfo exec_eval_using_params(PLpgSQL_execstate *estate, List *params)
static Portal exec_dynquery_with_params(PLpgSQL_execstate *estate, PLpgSQL_expr *dynquery, List *params, const char *portalname, int cursorOptions)
static int exec_stmt_getdiag(PLpgSQL_execstate *estate, PLpgSQL_stmt_getdiag *stmt)
static bool exec_eval_boolean(PLpgSQL_execstate *estate, PLpgSQL_expr *expr, bool *isNull)
static void plpgsql_param_eval_var_transfer(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void plpgsql_subxact_cb(SubXactEvent event, SubTransactionId mySubid, SubTransactionId parentSubid, void *arg)
static void plpgsql_param_eval_var(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
static void plpgsql_param_eval_var_check(ExprState *state, ExprEvalStep *op, ExprContext *econtext)
void plpgsql_exec_event_trigger(PLpgSQL_function *func, EventTriggerData *trigdata)
static void push_stmt_mcontext(PLpgSQL_execstate *estate)
static Datum exec_eval_expr(PLpgSQL_execstate *estate, PLpgSQL_expr *expr, bool *isNull, Oid *rettype, int32 *rettypmod)
static int exec_stmt_while(PLpgSQL_execstate *estate, PLpgSQL_stmt_while *stmt)
static void pop_stmt_mcontext(PLpgSQL_execstate *estate)
static void exec_check_assignable(PLpgSQL_execstate *estate, int dno)
static char * format_preparedparamsdata(PLpgSQL_execstate *estate, ParamListInfo paramLI)
static bool count_param_references(Node *node, count_param_references_context *context)
static PLpgSQL_variable * make_callstmt_target(PLpgSQL_execstate *estate, PLpgSQL_expr *expr)
static HeapTuple make_tuple_from_row(PLpgSQL_execstate *estate, PLpgSQL_row *row, TupleDesc tupdesc)
static int exec_stmt_perform(PLpgSQL_execstate *estate, PLpgSQL_stmt_perform *stmt)
static bool exec_is_simple_query(PLpgSQL_expr *expr)
static void exec_check_rw_parameter(PLpgSQL_expr *expr, int paramid)
void plpgsql_xact_cb(XactEvent event, void *arg)
static bool exec_eval_simple_expr(PLpgSQL_execstate *estate, PLpgSQL_expr *expr, Datum *result, bool *isNull, Oid *rettype, int32 *rettypmod)
static void copy_plpgsql_datums(PLpgSQL_execstate *estate, PLpgSQL_function *func)
static int exec_run_select(PLpgSQL_execstate *estate, PLpgSQL_expr *expr, long maxtuples, Portal *portalP)
static int exec_stmt_close(PLpgSQL_execstate *estate, PLpgSQL_stmt_close *stmt)
Oid plpgsql_exec_get_datum_type(PLpgSQL_execstate *estate, PLpgSQL_datum *datum)
const char * plpgsql_stmt_typename(PLpgSQL_stmt *stmt)
bool plpgsql_check_asserts
int plpgsql_extra_warnings
PLpgSQL_plugin ** plpgsql_plugin_ptr
bool CachedPlanAllowsSimpleValidityCheck(CachedPlanSource *plansource, CachedPlan *plan, ResourceOwner owner)
void FreeCachedExpression(CachedExpression *cexpr)
CachedExpression * GetCachedExpression(Node *expr)
bool CachedPlanIsSimplyValid(CachedPlanSource *plansource, CachedPlan *plan, ResourceOwner owner)
void ReleaseCachedPlan(CachedPlan *plan, ResourceOwner owner)
void ReleaseAllPlanCacheRefsInOwner(ResourceOwner owner)
@ PLPGSQL_STMT_RETURN_QUERY
@ PLPGSQL_STMT_RETURN_NEXT
@ PLPGSQL_STMT_DYNEXECUTE
#define PLPGSQL_XCHECK_TOOMANYROWS
@ PLPGSQL_RAISEOPTION_COLUMN
@ PLPGSQL_RAISEOPTION_TABLE
@ PLPGSQL_RAISEOPTION_SCHEMA
@ PLPGSQL_RAISEOPTION_CONSTRAINT
@ PLPGSQL_RAISEOPTION_DETAIL
@ PLPGSQL_RAISEOPTION_MESSAGE
@ PLPGSQL_RAISEOPTION_HINT
@ PLPGSQL_RAISEOPTION_ERRCODE
@ PLPGSQL_RAISEOPTION_DATATYPE
#define PLPGSQL_XCHECK_STRICTMULTIASSIGNMENT
@ PLPGSQL_PROMISE_TG_RELID
@ PLPGSQL_PROMISE_TG_WHEN
@ PLPGSQL_PROMISE_TG_ARGV
@ PLPGSQL_PROMISE_TG_TABLE_SCHEMA
@ PLPGSQL_PROMISE_TG_EVENT
@ PLPGSQL_PROMISE_TG_TABLE_NAME
@ PLPGSQL_PROMISE_TG_LEVEL
@ PLPGSQL_PROMISE_TG_NARGS
@ PLPGSQL_PROMISE_TG_NAME
@ PLPGSQL_GETDIAG_ERROR_DETAIL
@ PLPGSQL_GETDIAG_SCHEMA_NAME
@ PLPGSQL_GETDIAG_MESSAGE_TEXT
@ PLPGSQL_GETDIAG_DATATYPE_NAME
@ PLPGSQL_GETDIAG_TABLE_NAME
@ PLPGSQL_GETDIAG_CONSTRAINT_NAME
@ PLPGSQL_GETDIAG_COLUMN_NAME
@ PLPGSQL_GETDIAG_ROW_COUNT
@ PLPGSQL_GETDIAG_RETURNED_SQLSTATE
@ PLPGSQL_GETDIAG_CONTEXT
@ PLPGSQL_GETDIAG_ERROR_HINT
@ PLPGSQL_GETDIAG_ERROR_CONTEXT
@ PLPGSQL_GETDIAG_ROUTINE_OID
void PinPortal(Portal portal)
void UnpinPortal(Portal portal)
static bool DatumGetBool(Datum X)
static Datum PointerGetDatum(const void *X)
static Datum UInt64GetDatum(uint64 X)
static Datum Int16GetDatum(int16 X)
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static char * DatumGetCString(Datum X)
static Pointer DatumGetPointer(Datum X)
static Datum CStringGetDatum(const char *X)
static Datum Int32GetDatum(int32 X)
static int32 DatumGetInt32(Datum X)
#define PG_DIAG_SCHEMA_NAME
#define PG_DIAG_CONSTRAINT_NAME
#define PG_DIAG_DATATYPE_NAME
#define PG_DIAG_TABLE_NAME
#define PG_DIAG_COLUMN_NAME
void EnsurePortalSnapshotExists(void)
#define RelationGetDescr(relation)
#define RelationGetRelationName(relation)
#define RelationGetNamespace(relation)
ResourceOwner TopTransactionResourceOwner
ResourceOwner ResourceOwnerCreate(ResourceOwner parent, const char *name)
ResourceOwner CurrentResourceOwner
Snapshot GetTransactionSnapshot(void)
void PushActiveSnapshot(Snapshot snapshot)
void PopActiveSnapshot(void)
List * SPI_plan_get_plan_sources(SPIPlanPtr plan)
int SPI_execute_plan_with_paramlist(SPIPlanPtr plan, ParamListInfo params, bool read_only, long tcount)
void SPI_scroll_cursor_move(Portal portal, FetchDirection direction, long count)
void SPI_commit_and_chain(void)
SPIPlanPtr SPI_prepare_extended(const char *src, const SPIPrepareOptions *options)
HeapTupleHeader SPI_returntuple(HeapTuple tuple, TupleDesc tupdesc)
const char * SPI_result_code_string(int code)
void SPI_rollback_and_chain(void)
SPITupleTable * SPI_tuptable
Portal SPI_cursor_find(const char *name)
int SPI_execute_plan_extended(SPIPlanPtr plan, const SPIExecuteOptions *options)
void SPI_cursor_fetch(Portal portal, bool forward, long count)
Portal SPI_cursor_parse_open(const char *name, const char *src, const SPIParseOpenOptions *options)
Datum SPI_datumTransfer(Datum value, bool typByVal, int typLen)
CachedPlan * SPI_plan_get_cached_plan(SPIPlanPtr plan)
int SPI_register_trigger_data(TriggerData *tdata)
Portal SPI_cursor_open_with_paramlist(const char *name, SPIPlanPtr plan, ParamListInfo params, bool read_only)
void SPI_freetuptable(SPITupleTable *tuptable)
int SPI_keepplan(SPIPlanPtr plan)
void SPI_cursor_close(Portal portal)
void SPI_scroll_cursor_fetch(Portal portal, FetchDirection direction, long count)
int SPI_execute_extended(const char *src, const SPIExecuteOptions *options)
void * SPI_palloc(Size size)
HeapTuple SPI_copytuple(HeapTuple tuple)
Datum SPI_getbinval(HeapTuple tuple, TupleDesc tupdesc, int fnumber, bool *isnull)
#define SPI_ERROR_TRANSACTION
#define SPI_OK_UPDATE_RETURNING
#define SPI_OK_INSERT_RETURNING
#define SPI_OK_DELETE_RETURNING
#define SPI_OK_MERGE_RETURNING
void appendStringInfo(StringInfo str, const char *fmt,...)
void appendStringInfoString(StringInfo str, const char *s)
void appendStringInfoChar(StringInfo str, char ch)
void initStringInfo(StringInfo str)
void appendStringInfoStringQuoted(StringInfo str, const char *s, int maxlen)
MemoryContext es_query_cxt
struct ErrorContextCallback * previous
ParamListInfo ecxt_param_list_info
MemoryContext ecxt_per_query_memory
union ExprEvalStep::@60 d
ExecEvalSubroutine paramfunc
struct ExprEvalStep::@60::@74 cparam
NullableDatum args[FLEXIBLE_ARRAY_MEMBER]
struct PLpgSQL_condition * next
EState * simple_eval_estate
ResourceOwner simple_eval_resowner
ExprContext * eval_econtext
ResourceOwner procedure_resowner
Tuplestorestate * tuple_store
PLpgSQL_variable * err_var
MemoryContext tuple_store_cxt
TupleDesc tuple_store_desc
MemoryContext datum_context
MemoryContext stmt_mcontext
SPITupleTable * eval_tuptable
EventTriggerData * evtrigdata
ResourceOwner tuple_store_owner
MemoryContext stmt_mcontext_parent
CachedPlanSource * expr_simple_plansource
CachedPlan * expr_simple_plan
ExprState * expr_simple_state
LocalTransactionId expr_simple_plan_lxid
LocalTransactionId expr_simple_lxid
int fn_argvarnos[FUNC_MAX_ARGS]
PLpgSQL_stmt_block * action
struct PLpgSQL_execstate * cur_estate
void(* stmt_end)(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
void(* func_beg)(PLpgSQL_execstate *estate, PLpgSQL_function *func)
void(* func_end)(PLpgSQL_execstate *estate, PLpgSQL_function *func)
void(* stmt_beg)(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
PLpgSQL_raise_option_type opt_type
ExpandedRecordHeader * erh
PLpgSQL_expr * default_val
PLpgSQL_exception_block * exceptions
PLpgSQL_promise_type promise
int cursor_explicit_argrow
PLpgSQL_expr * cursor_explicit_expr
PLpgSQL_expr * default_val
ParamExternData params[FLEXIBLE_ARRAY_MEMBER]
ParserSetupHook parserSetup
ParamCompileHook paramCompile
ParamFetchHook paramFetch
SetFunctionReturnMode returnMode
Tuplestorestate * setResult
struct SimpleEcontextStackEntry * next
ExprContext * stack_econtext
SubTransactionId xact_subxid
bool has_generated_stored
uint64 tupDesc_identifier
CachedExpression * cast_cexpr
LocalTransactionId cast_lxid
ExprState * cast_exprstate
plpgsql_CastExprHashEntry * cast_centry
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(SysCacheIdentifier cacheId, Datum key1)
#define TRIGGER_FIRED_FOR_STATEMENT(event)
#define TRIGGER_FIRED_BY_DELETE(event)
#define TRIGGER_FIRED_BEFORE(event)
#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)
void SetTuplestoreDestReceiverParams(DestReceiver *self, Tuplestorestate *tStore, MemoryContext tContext, bool detoast, TupleDesc target_tupdesc, const char *map_failure_msg)
TupleConversionMap * convert_tuples_by_position(TupleDesc indesc, TupleDesc outdesc, const char *msg)
HeapTuple execute_attr_map_tuple(HeapTuple tuple, TupleConversionMap *map)
TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)
#define ReleaseTupleDesc(tupdesc)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
int64 tuplestore_tuple_count(Tuplestorestate *state)
Tuplestorestate * tuplestore_begin_heap(bool randomAccess, bool interXact, int maxKBytes)
void tuplestore_putvalues(Tuplestorestate *state, TupleDesc tdesc, const Datum *values, const bool *isnull)
void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)
TupleDesc lookup_rowtype_tupdesc(Oid type_id, int32 typmod)
TypeCacheEntry * lookup_type_cache(Oid type_id, int flags)
#define INVALID_TUPLEDESC_IDENTIFIER
#define TYPECACHE_TUPDESC
#define TYPECACHE_DOMAIN_BASE_INFO
static bool VARATT_IS_EXTERNAL_EXPANDED_RW(const void *PTR)
static bool VARATT_IS_EXTERNAL_NON_EXPANDED(const void *PTR)
static bool VARATT_IS_EXTERNAL_EXPANDED(const void *PTR)
static bool VARATT_IS_EXTERNAL_EXPANDED_RO(const void *PTR)
text * cstring_to_text(const char *s)
void BeginInternalSubTransaction(const char *name)
SubTransactionId GetCurrentSubTransactionId(void)
void CommandCounterIncrement(void)
void RollbackAndReleaseCurrentSubTransaction(void)
void ReleaseCurrentSubTransaction(void)
@ SUBXACT_EVENT_ABORT_SUB
@ SUBXACT_EVENT_COMMIT_SUB
@ XACT_EVENT_PARALLEL_COMMIT
@ XACT_EVENT_PARALLEL_ABORT