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

Function findTypeAnalyzeFunction

src/backend/commands/typecmds.c:2345–2370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2343}
2344
2345static Oid
2346findTypeAnalyzeFunction(List *procname, Oid typeOid)
2347{
2348 Oid argList[1];
2349 Oid procOid;
2350
2351 /*
2352 * Analyze functions always take one INTERNAL argument and return bool.
2353 */
2354 argList[0] = INTERNALOID;
2355
2356 procOid = LookupFuncName(procname, 1, argList, true);
2357 if (!OidIsValid(procOid))
2358 ereport(ERROR,
2359 (errcode(ERRCODE_UNDEFINED_FUNCTION),
2360 errmsg("function %s does not exist",
2361 func_signature_string(procname, 1, NIL, argList))));
2362
2363 if (get_func_rettype(procOid) != BOOLOID)
2364 ereport(ERROR,
2365 (errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
2366 errmsg("type analyze function %s must return type %s",
2367 NameListToString(procname), "boolean")));
2368
2369 return procOid;
2370}
2371
2372static Oid
2373findTypeSubscriptingFunction(List *procname, Oid typeOid)

Callers 2

DefineTypeFunction · 0.85
AlterTypeFunction · 0.85

Calls 6

LookupFuncNameFunction · 0.85
func_signature_stringFunction · 0.85
get_func_rettypeFunction · 0.85
NameListToStringFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50

Tested by

no test coverage detected