pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Hide internal error for pg_collation_actual_version(<bad OID>).
Date: Mon, 22 Feb 2021 11:28:52 +0000
Message-ID: <E1lE9OW-0000So-2d@gemulon.postgresql.org> (raw)

Hide internal error for pg_collation_actual_version(<bad OID>).

Instead of an unsightly internal "cache lookup failed" message, just
return NULL for bad OIDs, as is the convention for other similar things.

Reported-by: Justin Pryzby <pryzby@telsasoft.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/20210117215940.GE8560%40telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0fb0a0503bfc125764c8dba4f515058145dc7f8b

Modified Files
--------------
src/backend/catalog/index.c                    |  5 +++--
src/backend/catalog/pg_depend.c                |  3 ++-
src/backend/commands/collationcmds.c           |  2 +-
src/backend/utils/adt/pg_locale.c              |  9 +++++++--
src/include/utils/pg_locale.h                  |  2 +-
src/test/regress/expected/collate.icu.utf8.out | 14 ++++++++++++++
src/test/regress/sql/collate.icu.utf8.sql      |  5 +++++
7 files changed, 33 insertions(+), 7 deletions(-)



Message-ID: <E1lE9OW-0000So-2d@gemulon.postgresql.org>
Permalink:  ../E1lE9OW-0000So-2d@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lE9OW-0000So-2d@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: tmunro@postgresql.org
  Subject: Re: pgsql: Hide internal error for pg_collation_actual_version(<bad OID>).
  In-Reply-To: <E1lE9OW-0000So-2d@gemulon.postgresql.org>
  References: <E1lE9OW-0000So-2d@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