MCPcopy Create free account
hub / github.com/apache/cloudberry / free_parsestate

Function free_parsestate

src/backend/parser/parse_node.c:76–94  ·  view source on GitHub ↗

* free_parsestate * Release a ParseState and any subsidiary resources. */

Source from the content-addressed store, hash-verified

74 * Release a ParseState and any subsidiary resources.
75 */
76void
77free_parsestate(ParseState *pstate)
78{
79 /*
80 * Check that we did not produce too many resnos; at the very least we
81 * cannot allow more than 2^16, since that would exceed the range of a
82 * AttrNumber. It seems safest to use MaxTupleAttributeNumber.
83 */
84 if (pstate->p_next_resno - 1 > MaxTupleAttributeNumber)
85 ereport(ERROR,
86 (errcode(ERRCODE_TOO_MANY_COLUMNS),
87 errmsg("target lists can have at most %d entries",
88 MaxTupleAttributeNumber)));
89
90 if (pstate->p_target_relation != NULL)
91 table_close(pstate->p_target_relation, NoLock);
92
93 pfree(pstate);
94}
95
96
97/*

Callers 15

standard_ProcessUtilityFunction · 0.85
CreateTriggerFiringOnFunction · 0.85
DefineDomainFunction · 0.85
AlterDomainDefaultFunction · 0.85
interpret_AS_clauseFunction · 0.85
CreatePolicyFunction · 0.85
AlterPolicyFunction · 0.85
transformIndexStmtFunction · 0.85
transformStatsStmtFunction · 0.85
transformRuleStmtFunction · 0.85
parse_analyzeFunction · 0.85

Calls 4

table_closeFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50
pfreeFunction · 0.50

Tested by

no test coverage detected