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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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-22 05:34:22
Message-ID: CA+hUKGLY8TZAYtESZKTJ6MG1094u7V=M_XTfC0tdWEUC-=CFxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 18, 2021 at 8:15 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> Could you just add a test with pg_collation_current_version(0)?

Done.

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

Yeah, that isn't valid on my (quite current) GNU or FreeBSD systems,
and doesn't show up in their "locale -a" output, but I wondered about
that theoretical possibility and googled it, and that showed that it
does exist out there, though I don't know where/which versions,
possibly only a long time ago. You know what, let's just forget that
bit, it's not necessary. Removed.

> While on it, I guess that you could add tab completion support for
> CREATE COLLATION foo FROM.

Good point. Added.

> And shouldn't CREATE COLLATION complete
> with the list of existing collation?

Rght, fixed.

Attachment Content-Type Size
v3-0001-Hide-internal-error-for-pg_collation_actual_versi.patch text/x-patch 5.9 KB
v3-0002-pg_collation_actual_version-pg_collation_current_.patch text/x-patch 7.2 KB
v3-0003-Refactor-get_collation_current_version.patch text/x-patch 2.7 KB
v3-0004-Tab-complete-CREATE-COLLATION.patch text/x-patch 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2021-02-22 05:38:52 Re: libpq compression
Previous Message Michael Paquier 2021-02-22 05:22:46 Re: Use pgstat_progress_update_multi_param instead of single param update