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

Function transformParamRef

src/backend/parser/parse_expr.c:858–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

856}
857
858static Node *
859transformParamRef(ParseState *pstate, ParamRef *pref)
860{
861 Node *result;
862
863 /*
864 * The core parser knows nothing about Params. If a hook is supplied,
865 * call it. If not, or if the hook returns NULL, throw a generic error.
866 */
867 if (pstate->p_paramref_hook != NULL)
868 result = pstate->p_paramref_hook(pstate, pref);
869 else
870 result = NULL;
871
872 if (result == NULL)
873 ereport(ERROR,
874 (errcode(ERRCODE_UNDEFINED_PARAMETER),
875 errmsg("there is no parameter $%d", pref->number),
876 parser_errposition(pstate, pref->location)));
877
878 return result;
879}
880
881/* Test whether an a_expr is a plain NULL constant or not */
882static bool

Callers 1

transformExprRecurseFunction · 0.85

Calls 3

parser_errpositionFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected