pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Be more consistent about errors for opfamily member lookup failu
Date: Mon, 24 Jul 2017 15:23:36 +0000
Message-ID: <E1dZfCq-0003JD-8t@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/278cb4341103e967189997985b09981a73e23a34

Modified Files
--------------
src/backend/catalog/index.c             | 4 ++++
src/backend/catalog/partition.c         | 7 ++++---
src/backend/executor/execExpr.c         | 3 +++
src/backend/executor/execReplication.c  | 3 +--
src/backend/executor/nodeIndexscan.c    | 3 +++
src/backend/optimizer/path/indxpath.c   | 4 ++--
src/backend/optimizer/path/pathkeys.c   | 4 ++--
src/backend/optimizer/plan/createplan.c | 7 ++++---
src/backend/utils/cache/relcache.c      | 4 ++++
9 files changed, 27 insertions(+), 12 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1dZfCq-0003JD-8t@gemulon.postgresql.org>
Permalink:  ../E1dZfCq-0003JD-8t@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1dZfCq-0003JD-8t@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Be more consistent about errors for opfamily member lookup failu
  In-Reply-To: <E1dZfCq-0003JD-8t@gemulon.postgresql.org>
  References: <E1dZfCq-0003JD-8t@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox