Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-01-17T22:22:13Z
Lists: pgsql-hackers
On Mon, Jan 18, 2021 at 10:59 AM Justin Pryzby > |postgres=# SELECT
pg_collation_actual_version(123);
> |ERROR:  cache lookup failed for collation 123

Yeah, not a great user experience.  Will fix next week; perhaps
get_collation_version_for_oid() needs missing_ok and found flags, or
something like that.

I'm also wondering if it would be better to name that thing with
"current" rather than "actual".



Commits

  1. Tab-complete CREATE COLLATION.

  2. Refactor get_collation_current_version().

  3. pg_collation_actual_version() -> pg_collation_current_version().

  4. Hide internal error for pg_collation_actual_version(<bad OID>).