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

Function op_error

src/backend/parser/parse_oper.c:633–657  ·  view source on GitHub ↗

* op_error - utility routine to complain about an unresolvable operator */

Source from the content-addressed store, hash-verified

631 * op_error - utility routine to complain about an unresolvable operator
632 */
633static void
634op_error(ParseState *pstate, List *op, char oprkind,
635 Oid arg1, Oid arg2,
636 FuncDetailCode fdresult, int location)
637{
638 if (fdresult == FUNCDETAIL_MULTIPLE)
639 ereport(ERROR,
640 (errcode(ERRCODE_AMBIGUOUS_FUNCTION),
641 errmsg("operator is not unique: %s",
642 op_signature_string(op, oprkind, arg1, arg2)),
643 errhint("Could not choose a best candidate operator. "
644 "You might need to add explicit type casts."),
645 parser_errposition(pstate, location)));
646 else
647 ereport(ERROR,
648 (errcode(ERRCODE_UNDEFINED_FUNCTION),
649 errmsg("operator does not exist: %s",
650 op_signature_string(op, oprkind, arg1, arg2)),
651 (!arg1 || !arg2) ?
652 errhint("No operator matches the given name and argument type. "
653 "You might need to add an explicit type cast.") :
654 errhint("No operator matches the given name and argument types. "
655 "You might need to add explicit type casts."),
656 parser_errposition(pstate, location)));
657}
658
659/*
660 * make_op()

Callers 2

operFunction · 0.85
left_operFunction · 0.85

Calls 5

op_signature_stringFunction · 0.85
parser_errpositionFunction · 0.85
errcodeFunction · 0.50
errmsgFunction · 0.50
errhintFunction · 0.50

Tested by

no test coverage detected