Hide internal error for pg_collation_actual_version(<bad OID>).
Thomas Munro <tmunro@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/index.c | modified | +3 −2 |
| src/backend/catalog/pg_depend.c | modified | +2 −1 |
| src/backend/commands/collationcmds.c | modified | +1 −1 |
| src/backend/utils/adt/pg_locale.c | modified | +7 −2 |
| src/include/utils/pg_locale.h | modified | +1 −1 |
| src/test/regress/expected/collate.icu.utf8.out | modified | +14 −0 |
| src/test/regress/sql/collate.icu.utf8.sql | modified | +5 −0 |
Discussion
- pg_collation_actual_version() ERROR: cache lookup failed for collation 123 9 messages · 2021-01-17 → 2021-02-22