Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123 - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123
Date
Msg-id CA+hUKGLBLAL28XqmgPe=qEourgQBd++7RdS_u7o5FwJBenRcJg@mail.gmail.com
Whole thread Raw
In response to Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Jan 18, 2021 at 11:22 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> 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.

Here's a patch that gives:

postgres=# select pg_collation_actual_version(123);
ERROR:  no collation found for OID 123

It's a bit of an odd function, it's user-facing yet deals in OIDs.

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

Here's a patch to do that (note to self: would need a catversion bump).

While tidying up around here, I was dissatisfied with the fact that
there are three completely different ways of excluding "C[.XXX]" and
"POSIX" for three OSes, so here's a patch to merge them.

Also, here's the missing tab completion for CREATE COLLATION, since
it's rare enough to be easy to forget the incantations required.

Attachment

pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: Parallel INSERT (INTO ... SELECT ...)
Next
From: Andres Freund
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY