diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-07-24 11:23:27 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-07-24 11:23:27 -0400 |
commit | 278cb4341103e967189997985b09981a73e23a34 (patch) | |
tree | 0b80dc3966c48f71463ffa9c9f3e6184fa09e2ea /src/backend/executor/execReplication.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/execReplication.c')
-rw-r--r-- | src/backend/executor/execReplication.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/executor/execReplication.c b/src/backend/executor/execReplication.c index bc53d07c7db..3819de28ad9 100644 --- a/src/backend/executor/execReplication.c +++ b/src/backend/executor/execReplication.c @@ -81,9 +81,8 @@ build_replindex_scan_key(ScanKey skey, Relation rel, Relation idxrel, operator = get_opfamily_member(opfamily, optype, optype, BTEqualStrategyNumber); - if (!OidIsValid(operator)) - elog(ERROR, "could not find member %d(%u,%u) of opfamily %u", + elog(ERROR, "missing operator %d(%u,%u) in opfamily %u", BTEqualStrategyNumber, optype, optype, opfamily); regop = get_opcode(operator); |