aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/collationcmds.c
diff options
context:
space:
mode:
authorThomas Munro <tmunro@postgresql.org>2021-02-22 23:01:20 +1300
committerThomas Munro <tmunro@postgresql.org>2021-02-22 23:01:20 +1300
commit0fb0a0503bfc125764c8dba4f515058145dc7f8b (patch)
tree98219612960d21cb75f0d962fab08fb917f42824 /src/backend/commands/collationcmds.c
parentf05ed5a5cfa55878baa77a1e39d68cb09793b477 (diff)
downloadpostgresql-0fb0a0503bfc125764c8dba4f515058145dc7f8b.tar.gz
postgresql-0fb0a0503bfc125764c8dba4f515058145dc7f8b.zip
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
Diffstat (limited to 'src/backend/commands/collationcmds.c')
-rw-r--r--src/backend/commands/collationcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c
index 9634ae6809d..a7ee452e192 100644
--- a/src/backend/commands/collationcmds.c
+++ b/src/backend/commands/collationcmds.c
@@ -273,7 +273,7 @@ pg_collation_actual_version(PG_FUNCTION_ARGS)
Oid collid = PG_GETARG_OID(0);
char *version;
- version = get_collation_version_for_oid(collid);
+ version = get_collation_version_for_oid(collid, true);
if (version)
PG_RETURN_TEXT_P(cstring_to_text(version));