diff options
| author | Tom Lane | 2017-07-24 15:23:27 +0000 |
|---|---|---|
| committer | Tom Lane | 2017-07-24 15:23:27 +0000 |
| commit | 278cb4341103e967189997985b09981a73e23a34 (patch) | |
| tree | 0b80dc3966c48f71463ffa9c9f3e6184fa09e2ea /src/backend/executor/execExpr.c | |
| parent | bbbd9121e63f9f7cf8cc86025d5d848fba477eb4 (diff) | |
Be more consistent about errors for opfamily member lookup failures.
Add error checks in some places that were calling get_opfamily_member
or get_opfamily_proc and just assuming that the call could never fail.
Also, standardize the wording for such errors in some other places.
None of these errors are expected in normal use, hence they're just
elog not ereport. But they may be handy for diagnosing omissions in
custom opclasses.
Rushabh Lathia found the oversight in RelationBuildPartitionKey();
I found the others by grepping for all callers of these functions.
Discussion: https://postgr.es/m/CAGPqQf2R9Nk8htpv0FFi+FP776EwMyGuORpc9zYkZKC8sFQE3g@mail.gmail.com
Diffstat (limited to 'src/backend/executor/execExpr.c')
| -rw-r--r-- | src/backend/executor/execExpr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index 5267a011bbb..7496189fabf 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -1640,6 +1640,9 @@ ExecInitExprRec(Expr *node, PlanState *parent, ExprState *state, lefttype, righttype, BTORDER_PROC); + if (!OidIsValid(proc)) + elog(ERROR, "missing support function %d(%u,%u) in opfamily %u", + BTORDER_PROC, lefttype, righttype, opfamily); /* Set up the primary fmgr lookup information */ finfo = palloc0(sizeof(FmgrInfo)); |
