mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
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
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user