Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jy0h9-0006pR-S3 for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jul 2020 22:25:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jy0h8-00081Y-KL for pgsql-hackers@arkaria.postgresql.org; Tue, 21 Jul 2020 22:25:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jy0h8-00081Q-DG for pgsql-hackers@lists.postgresql.org; Tue, 21 Jul 2020 22:25:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jy0h6-00044n-4T for pgsql-hackers@postgresql.org; Tue, 21 Jul 2020 22:25:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 06LMP0Ni1199427; Tue, 21 Jul 2020 18:25:01 -0400 From: Tom Lane To: Justin Pryzby cc: pgsql-hackers@postgresql.org Subject: Re: v13 planner ERROR: could not determine which collation to use for string comparison In-reply-to: <20200721191606.GL5748@telsasoft.com> References: <20200721191606.GL5748@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Tue, 21 Jul 2020 14:16:06 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1199425.1595370300.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 21 Jul 2020 18:25:00 -0400 Message-ID: <1199426.1595370300@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Justin Pryzby 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 !=3D 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