Re: v13 planner ERROR: could not determine which collation to use for string comparison

Justin Pryzby <pryzby@telsasoft.com>

From: Justin Pryzby <pryzby@telsasoft.com>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2020-07-21T19:57:57Z
Lists: pgsql-hackers
Reproducer:

postgres=# CREATE TABLE t AS SELECT ''a FROM generate_series(1,99); CREATE TABLE u AS SELECT ''a FROM generate_series(1,99) ; VACUUM ANALYZE t,u;
postgres=# explain SELECT * FROM t JOIN u ON t.a!=u.a;
ERROR:  could not determine which collation to use for string comparison
HINT:  Use the COLLATE clause to set the collation explicitly.



Commits

  1. neqjoinsel must now pass through collation to eqjoinsel.

  2. Use query collation, not column's collation, while examining statistics.