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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123
Date: 2021-02-18 07:15:44
Message-ID: YC4UIOaPTk1wxDms@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 18, 2021 at 10:45:53AM +1300, Thomas Munro wrote:
> I guess I was trying to preserve a distinction between "unknown OID"
> and "this is a collation OID, but I don't have version information for
> it" (for example, "C.utf8"). But it hardly matters, and your
> suggestion works for me. Thanks for looking!

Could you just add a test with pg_collation_current_version(0)?

+ pg_strncasecmp("POSIX.", collcollate, 6) != 0)
I didn't know that "POSIX." was possible.

While on it, I guess that you could add tab completion support for
CREATE COLLATION foo FROM. And shouldn't CREATE COLLATION complete
with the list of existing collation?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2021-02-18 07:24:23 Re: Is it worth accepting multiple CRLs?
Previous Message Kyotaro Horiguchi 2021-02-18 06:15:57 Re: Asynchronous Append on postgres_fdw nodes.