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

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2020-07-21T19:34:01Z
Lists: pgsql-hackers
On Tuesday, July 21, 2020, Justin Pryzby <pryzby@telsasoft.com> wrote:

> 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.
>
> It's possible we're doing soemthing wrong and I need to revisit docs..but
> this
> was working in v12.
>

This sounds suspiciously like a side-effect of:


https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=022cd0bfd33968f2b004106cfeaa3b2951e7f322

David J.

Commits

  1. neqjoinsel must now pass through collation to eqjoinsel.

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