Re: pg_collation_actual_version() ERROR: cache lookup failed for collation 123
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Justin Pryzby <pryzby@telsasoft.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-02-18T07:15:44Z
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
Commits
-
Tab-complete CREATE COLLATION.
- 5bc09a74719d 14.0 landed
-
Refactor get_collation_current_version().
- beb4480c853a 14.0 landed
-
pg_collation_actual_version() -> pg_collation_current_version().
- 9cf184cc0599 14.0 landed
-
Hide internal error for pg_collation_actual_version(<bad OID>).
- 0fb0a0503bfc 14.0 landed