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 1jePRg-0007hr-9z for pgsql-bugs@arkaria.postgresql.org; Thu, 28 May 2020 20:48:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jePRe-0001sO-RA for pgsql-bugs@arkaria.postgresql.org; Thu, 28 May 2020 20:48: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 1jePRe-0001sG-Ky for pgsql-bugs@lists.postgresql.org; Thu, 28 May 2020 20:48: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 1jePRc-0005lF-9Q for pgsql-bugs@lists.postgresql.org; Thu, 28 May 2020 20:48:06 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 04SKm0Q5021750; Thu, 28 May 2020 16:48:01 -0400 From: Tom Lane To: James Lucas cc: PostgreSQL mailing lists Subject: Re: Explicit deterministic COLLATE fails with pattern matching operations on column with non-deterministic collation In-reply-to: References: <7417.1590690568@sss.pgh.pa.us> <6351fb21-8282-406c-af64-22a3c9e1219b@manitou-mail.org> Comments: In-reply-to James Lucas message dated "Thu, 28 May 2020 15:42:07 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7942.1590698880.1@sss.pgh.pa.us> Date: Thu, 28 May 2020 16:48:00 -0400 Message-ID: <7943.1590698880@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk James Lucas writes: > So that is something to be aware of - the collation defined on the > column can impact stats values, which could in turn impact plans > chosen for queries that use alternative collations. Yeah. At some point we might try to collect stats with respect to multiple collations, but that's a long way off probably. (I have suggested that CREATE STATISTICS could be extended to control this type of thing, but I don't think anyone's worked on making it happen.) regards, tom lane