]> granicus.if.org Git - postgresql/commit
Be more consistent about errors for opfamily member lookup failures.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Jul 2017 15:23:27 +0000 (11:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 24 Jul 2017 15:23:27 +0000 (11:23 -0400)
commit278cb4341103e967189997985b09981a73e23a34
tree0b80dc3966c48f71463ffa9c9f3e6184fa09e2ea
parentbbbd9121e63f9f7cf8cc86025d5d848fba477eb4
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
src/backend/catalog/index.c
src/backend/catalog/partition.c
src/backend/executor/execExpr.c
src/backend/executor/execReplication.c
src/backend/executor/nodeIndexscan.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/pathkeys.c
src/backend/optimizer/plan/createplan.c
src/backend/utils/cache/relcache.c