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

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-hackers@postgresql.org
Date: 2020-07-21T22:25:00Z
Lists: pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> We hit this on v13b2 and verified it fails on today's HEAD (ac25e7b039).
> explain SELECT 1 FROM sites NATURAL JOIN sectors WHERE sites.config_site_name != sectors.sect_name ;
> ERROR:  could not determine which collation to use for string comparison 

> I can workaround the issue by DELETEing stats for either column.

Ugh.  It's clear from your stack trace that neqjoinsel() has forgotten to
pass through collation to eqjoinsel().  Will fix.

			regards, tom lane



Commits

  1. neqjoinsel must now pass through collation to eqjoinsel.

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