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 1l2zYB-0000R3-5v for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Jan 2021 16:44:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2zXe-00017z-CL for pgsql-bugs@arkaria.postgresql.org; Fri, 22 Jan 2021 16:44:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2zXe-00017f-6X for pgsql-bugs@lists.postgresql.org; Fri, 22 Jan 2021 16:44:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2zXa-0004ZO-Id for pgsql-bugs@lists.postgresql.org; Fri, 22 Jan 2021 16:44:09 +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 10MGi3qV1165679; Fri, 22 Jan 2021 11:44:03 -0500 From: Tom Lane To: zhangh3@aetna.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16835: btree index does not work for where clause using 'foo%' In-reply-to: <16835-419ddd12f1e74ee5@postgresql.org> References: <16835-419ddd12f1e74ee5@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 22 Jan 2021 15:56:52 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1165677.1611333843.1@sss.pgh.pa.us> Date: Fri, 22 Jan 2021 11:44:03 -0500 Message-ID: <1165678.1611333843@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > https://www.postgresql.org/docs/11/indexes-types.html, according to this > page, btree index is supposed to work for where clause col like 'foo%', but > does not work for me. we are on aurora postgres 11, I also tested on > postgres 11, it does not work either. As the manual explains, that will not work by default unless your database locale is C (which is an uncommon default nowadays). It's also possible that Aurora has changed something that keeps it from working, but I'd investigate the locale angle first. regards, tom lane