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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Thomas Munro-4
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 <[hidden email]>
Reviewed-by: Michael Paquier <[hidden email]>
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(-)