Unexpected "cache lookup failed for collation 0" failure

From: Manuel Rigger <rigger(dot)manuel(at)gmail(dot)com>
To: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Unexpected "cache lookup failed for collation 0" failure
Date: 2019-11-13 16:01:56
Message-ID: CA+u7OA4HOjtymxAbuGNh4-X_2R0Lw5n01tzvP8E5-i-2gQXYWA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi everyone,

Is the error "cache lookup failed for collation 0" in this context expected?

CREATE TABLE t0(c0 CHAR(2) COLLATE "C", c1 CHAR(2) COLLATE "POSIX");
INSERT INTO t0 VALUES('', '');
SELECT * FROM t0 WHERE t0.c1 NOT IN (t0.c0); -- unexpected: cache
lookup failed for collation 0

This looks like an internal error message to me. I would expect an
"ERROR: could not determine which collation to use for string
comparison", which is shown in similar situations (e.g., when
replacing the "NOT IN" by "IN"). This appears like a minor issue to me
though.

Best,
Manuel

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2019-11-13 16:38:51 Re: REINDEX CONCURRENTLY unexpectedly fails
Previous Message Tom Lane 2019-11-13 15:59:08 Re: REINDEX CONCURRENTLY unexpectedly fails