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 1ux3qW-00ALKn-Rq for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 13:29:48 +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 1ux3qU-001B6l-PC for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 13:29:47 +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 1ux3qU-001B6Z-D0 for pgsql-general@lists.postgresql.org; Fri, 12 Sep 2025 13:29:47 +0000 Received: from mail-oa1-x2c.google.com ([2001:4860:4864:20::2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ux3qT-0002Pr-0S for pgsql-general@postgresql.org; Fri, 12 Sep 2025 13:29:46 +0000 Received: by mail-oa1-x2c.google.com with SMTP id 586e51a60fabf-30cce8c3afaso1206572fac.1 for ; Fri, 12 Sep 2025 06:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757683784; x=1758288584; 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=Bqk5UFXy7eYBbiFORBBWnPQIywl2+i5SVesYnW0NNZQ=; b=CUzH02Ovd/kuVc2Rletq42KKZ7Hm9UVFycesva7HyCSZRY1Ky9yub7AWg84oqirqgp yDnXHXv2hn/mAYxLl3AoQEXl70av9IQb0Fod4e6OsqPhnRSBMO2PpUvqN4glSpLrOxfI PiCWEoTPVvg67gpo7YGvuOV3uA4ykuE8rY5FfldWuFO482xN8OzBcT58+FueYT3ktS3u PRNM2orEyFgy64zKfCl3ZKN6GxBzqOD9DT0wFn39rdyj7Lwt9MEVdQOTwCX8SPmdB2Mz wjRIYC6YDy0lOMhgKRZ5x144537w0nxFcm25GZri9iOoVjgDif8VI5aPHqLVNL53h+TL vEvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757683784; x=1758288584; 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=Bqk5UFXy7eYBbiFORBBWnPQIywl2+i5SVesYnW0NNZQ=; b=LXW3JOT9c4kjCK1wWy79g+HK+8bSs4gtu1mQRgv+lkTs2GEtzDDxzBAnUzPzXXtoP6 BWPpe33YooorkmI9hYQgVBbZtC7jwDDS/iUlaqsaKCJw9DhiFjRQ1cQQjRbxMgt+L/uA FatNlpYZgMrMGu0WWpXwnPIfXu9KlfzviMs+3kHLF6aTegbq2k/tS5UAN/+gNW/gUj3T ogl00GNn7hmOLGPkANvldY0zarT7tPAy0dTFavhFht4vq9FTyEfa0b1xHKstfKmjlvNd a0CoMhHze3VSbHdlUjp2/u/Eif6rcDWJ3EKrm6WBKpPFTEFbtcHA5O84zoWnj3kmqi7r qC4w== X-Gm-Message-State: AOJu0YyLHeAlMELRu18hM2eNQymrl3Iqfho8G9U9ExSnb9DM2ozuWq/V apBRDf+Ugs4djxmkZKX5wywQhPgNAeYfXCKhBBoPEjjrC1eS+C2HJy/Z8JeitsdQHKBDJZWMQil bVnSNFpDcfd403kGYDdYrfh8og8mSc2A= X-Gm-Gg: ASbGncunr6CuTDPgYxvluF3LsPCG23iOn4+ErEH3NOXj808Tl24JW7Zex4B/qgc65CE bXc0FsAOYJm/yXl6YxOurZi9PvFAYcOq6MOyU+87kEjaKdnb3Xni7aueqPjL65llfjvIX0fXUq4 yRZxWuWAUU23vsL63mH2xv2TRoxgLQc+upP8rke5Bm+lJEDN4hTCXrPZJjS68WE6SnJvE4dj2j1 J9ccXA1yQ== X-Google-Smtp-Source: AGHT+IFeWwIgMQKeEcAEO0OzdpQKvIerDWaKy78OhKsDlpMqtrmb3UQZxIG+KBLmE+ZZdLnfkaUKZ5fkDAbDUUA0PuM= X-Received: by 2002:a05:6871:738e:b0:315:9347:9260 with SMTP id 586e51a60fabf-32e58144acdmr1208180fac.32.1757683784617; Fri, 12 Sep 2025 06:29:44 -0700 (PDT) MIME-Version: 1.0 References: <77a63548783dd4007ee479a4c5ed300629aaa776.camel@cybertec.at> In-Reply-To: From: Dominique Devienne Date: Fri, 12 Sep 2025 15:29:33 +0200 X-Gm-Features: Ac12FXzJhekQfogGWpxblM4jeLimPmSzArS2qacm0oc7deigzdLUwONVsr9KOq4 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: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 incorrect= . > 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)