1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-22 12:22:45 +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:
Thomas Munro
2021-02-22 23:01:20 +13:00
parent f05ed5a5cf
commit 0fb0a0503b
7 changed files with 33 additions and 7 deletions

View File

@@ -116,7 +116,8 @@ recordMultipleDependencies(const ObjectAddress *depender,
referenced->objectId == POSIX_COLLATION_OID)
continue;
version = get_collation_version_for_oid(referenced->objectId);
version = get_collation_version_for_oid(referenced->objectId,
false);
/*
* Default collation is pinned, so we need to force recording