From 0fb0a0503bfc125764c8dba4f515058145dc7f8b Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Mon, 22 Feb 2021 23:01:20 +1300 Subject: Hide internal error for pg_collation_actual_version(). 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 Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/20210117215940.GE8560%40telsasoft.com --- src/backend/commands/collationcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/commands/collationcmds.c') 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)); -- cgit v1.2.3