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 1lExhd-0004Vs-Sm for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Feb 2021 17:11:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lExhc-0002ul-Q3 for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Feb 2021 17:11:56 +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 1lExhc-0002ue-Ja for pgsql-hackers@lists.postgresql.org; Wed, 24 Feb 2021 17:11:56 +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 1lExha-00008r-I4 for pgsql-hackers@lists.postgresql.org; Wed, 24 Feb 2021 17:11:55 +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 11OHBpon4099575; Wed, 24 Feb 2021 12:11:51 -0500 From: Tom Lane To: Alvaro Herrera cc: Joel Jacobson , pgsql-hackers@lists.postgresql.org Subject: Re: Bizarre behavior of \w in a regular expression bracket construct In-reply-to: <20210224164749.GA10596@alvherre.pgsql> References: <20210224164749.GA10596@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 24 Feb 2021 13:47:49 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4099573.1614186711.1@sss.pgh.pa.us> Date: Wed, 24 Feb 2021 12:11:51 -0500 Message-ID: <4099574.1614186711@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2021-Feb-23, Tom Lane wrote: >> * Create infrastructure to allow treating \w as a character class >> in its own right. (I did not expose [[:word:]] as a class name, >> though it would be a little more symmetric to do so; should we?) > Apparently [:word:] is a GNU extension (or at least a "bash-specific > character class"[1] but apparently Emacs also supports it?); all the > others are mandated by POSIX[2]. > I think it'd be fine to expose [:word:] ... Yeah, I'd independently come to the same conclusion. This GNU precedent offers even more basis for that, though. regards, tom lane