diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-02-22 23:01:20 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-02-22 23:01:20 +1300 |
commit | 0fb0a0503bfc125764c8dba4f515058145dc7f8b (patch) | |
tree | 98219612960d21cb75f0d962fab08fb917f42824 /src/include/utils/pg_locale.h | |
parent | f05ed5a5cfa55878baa77a1e39d68cb09793b477 (diff) | |
download | postgresql-0fb0a0503bfc125764c8dba4f515058145dc7f8b.tar.gz |
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/include/utils/pg_locale.h')
-rw-r--r-- | src/include/utils/pg_locale.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/utils/pg_locale.h b/src/include/utils/pg_locale.h index 34dff74bd1..5a37caefbe 100644 --- a/src/include/utils/pg_locale.h +++ b/src/include/utils/pg_locale.h @@ -103,7 +103,7 @@ typedef struct pg_locale_struct *pg_locale_t; extern pg_locale_t pg_newlocale_from_collation(Oid collid); -extern char *get_collation_version_for_oid(Oid collid); +extern char *get_collation_version_for_oid(Oid collid, bool missing_ok); #ifdef USE_ICU extern int32_t icu_to_uchar(UChar **buff_uchar, const char *buff, size_t nbytes); |