Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ux3vm-00AMK4-CY for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 13:35:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ux3vk-001EI3-75 for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 13:35:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ux3vj-001EHq-SB for pgsql-general@lists.postgresql.org; Fri, 12 Sep 2025 13:35:12 +0000 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ux3vi-0002SD-2Q for pgsql-general@postgresql.org; Fri, 12 Sep 2025 13:35:11 +0000 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-30cce534a91so698252fac.0 for ; Fri, 12 Sep 2025 06:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757684110; x=1758288910; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CrtTEoD0hScpWeYDXHDZrzKbtMPbzlLjcdgSofYNFUY=; b=iqpMPfAzeiQxGkb9SSxJ7398nJA3pgcIcbvdDWQjEenipIaayP7ifyt+DmqD9vaGKM RZ06myIATM3l56teM4/WBcHT7btld9Xz2FDTwJl27n4QKggeshj7RtK/O6IlSNyoufse i9EUWuo5E8kx+zjLjJZxsRJb4KBWV+XCdJ1TmI/QbXT5Do4W6MXBtsQvKLNqqyk9CK/N /2LrFmHkVVW0bFN1/a4m/6rfcUPB4aVlqcBvk8SeWQWyYpUBYT0LUI3K3cdxbYCLYLq4 iC8TeAyh3VC4sNBbAwAxHj0miC1gAh6kvI8X1lT5cV8XAonkvAno1Xhm1x0UrVPd2ObF 5IOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757684110; x=1758288910; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CrtTEoD0hScpWeYDXHDZrzKbtMPbzlLjcdgSofYNFUY=; b=uzyh0BMH+X8O5/hc0i0G2fSHkftDP24pj+e1oh0XC77DSi/ZDKB1ah/f2chCiIyh5B zPMGzYk6deaDlNDoy4y4DuN/WR3cPIBnOOWnIJVVx7rUqIC7vLkEtuNMngnXSG7n3l1j +LwdG/pyMuesDWq0JUuuZeFoPkzmX4VaAsa877eTiFKQOy/YFohcIgquDeQxeFiXMY2m RLZEnxl0apORNIEBjztMDf/P5nnaTawBvkwGfq2bTqXT91OU4YGe/8NJbosJRCuj8DLc pfO838zcjQfIS3+44leVzVyIsQXJ+Mb73ZGDMVsIUrEp488S29wQ/jsCWEoSf8QG+C8p yjzQ== X-Gm-Message-State: AOJu0YxTeQ8o/UiZBjZ3oRzk/tM2erez/4F/CTJEzdWEs4km2oEdslcJ aKc/BtwHBMppAMqkfZwauvxam1XueqjsIqhQ4dOqQ3AcTCr8whm3t+YudPzbk1ps/GpcFjmrseh lmRDP6lsp/cIpZsTKBX7Wyb3Dm1wWkRo= X-Gm-Gg: ASbGncv/cvotK4LsWddnKMcs0WY1WUgxegvK82pEV02HfRg51qNXzm1G15zmk23PNdp UTDViw3LszPg9aKnQr6aS2FD4xOUAV6Tebj1IoL8BKdQl1+Nm8Pi9fNOYQicO2hXDD0iPO6moFY yLqvSe7FkBz3/BbhcKH6+mRCF0OkslxJOJhAZefpwatpbImG2647tKuHFQWs8NkRMLX/1DLWPhR 8Q7+GaCwg== X-Google-Smtp-Source: AGHT+IGZ+FzKZcgXUjO4eC6+i4MmhYD6FF/JgYnwN7RVP7dp04bEBodA93L8i1af50H2iaEbl55kmQijxkjrARjj7eY= X-Received: by 2002:a05:6871:419c:b0:315:2d27:4472 with SMTP id 586e51a60fabf-32e56cbf40emr1513637fac.44.1757684110463; Fri, 12 Sep 2025 06:35:10 -0700 (PDT) MIME-Version: 1.0 References: <77a63548783dd4007ee479a4c5ed300629aaa776.camel@cybertec.at> In-Reply-To: From: Dominique Devienne Date: Fri, 12 Sep 2025 15:34:58 +0200 X-Gm-Features: Ac12FXxRSqPqaZ22k7lShPR2HcyMBY95jB7_VT1z8wQ4uwJYguGZTb3ALWMUzmg Message-ID: Subject: Re: Latest patches break one of our unit-test, related to RLS To: Laurenz Albe Cc: pgsql-general@postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Sep 12, 2025 at 3:29=E2=80=AFPM Dominique Devienne wrote: > On Fri, Sep 12, 2025 at 3:24=E2=80=AFPM Dominique Devienne wrote: > > On Fri, Sep 12, 2025 at 3:11=E2=80=AFPM Dominique Devienne wrote: > > > So I don't see how my `... where v similar to 'foo[\d\w]_%'` is incorre= ct. > > So again, is this a bug / regression or not? Thanks, --DD > > If I use (x|y) instead of [xy] it seems to behave correctly. > Whether x is the full-length POSIX class, or the shorthand notation. > This DOES look like a bug, no? I've done regexes for a long time, > and these two forms should be equivalent IMHO. --DD > > postgres=3D# show server_version; > server_version > ---------------- > 18rc1 > (1 row) > > > postgres=3D# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar')) > select v from t where v similar to 'foo[\d\w]_%'; > v > --- > (0 rows) > > > postgres=3D# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar')) > select v from t where v similar to 'foo[[[:digit:]][[:word:]]]_%'; > v > --- > (0 rows) > > > postgres=3D# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar')) > select v from t where v similar to 'foo([[:digit:]]|[[:word:]])_%'; > v > --------- > foo0bar > (1 row) > > > postgres=3D# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar')) > select v from t where v similar to 'foo(\d|\w)_%'; > v > --------- > foo0bar > (1 row) For completeness: postgres=3D# with t(v) as (values ('foo:bar'), ('foo/bar'), ('foo0bar')) select v from t where v similar to 'foo[0-9a-zA-Z]_%'; v --------- foo0bar (1 row)