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 1ux4lg-00AW2k-FG for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 14:28:52 +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 1ux4ld-001lRu-UK for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 14:28:50 +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 1ux4ld-001lRh-Ic for pgsql-general@lists.postgresql.org; Fri, 12 Sep 2025 14:28:50 +0000 Received: from mail-oa1-x33.google.com ([2001:4860:4864:20::33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ux4lc-0002tj-0v for pgsql-general@postgresql.org; Fri, 12 Sep 2025 14:28:49 +0000 Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-30cce872d9cso1480683fac.1 for ; Fri, 12 Sep 2025 07:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757687328; x=1758292128; 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=4dBYCp8hgdlQlGc50AI0pW6ornTYOekT9+cPLxw8ER8=; b=Ljax7SbLTwX3TB8my5jk4hIMMXvFk/ztHFjcy3IkW8MFRgcI08Au1lXui6/iApaVux AjwUPXTVLRJSfpuWVYGgA4n6OIkKCKzAP3WD5m85bI5guYopWVLcEReLzP8L/D8UVuky DceeiuHT+/zYtJRjhUVGNXD7qbLIQ/zSN/WueC9gT9ooZvD0tZKhrF3L95rukwr4GB/o MDa3S8VmYTL6a1Z9KqY0Fn2hH4jtbh4o5wxI+Fx+HzyGtsf3awZrUYu8ti1NIOmUdGka DudWYN91adK/eegpK97EqSqgCzvPD11zwe9UDldQGA455CNaPL8qN2tR/LIXImeMYd9R rvHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757687328; x=1758292128; 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=4dBYCp8hgdlQlGc50AI0pW6ornTYOekT9+cPLxw8ER8=; b=N9/e8lo4jnbVj1R4gpsuHwF771us+H8sRt5RaH8k7k5p2VB9UVE8Ft4078m6VzPsgV 9f1IpX9TWJ51nKjle87+H0cZ5/Xc2KERm+jgFV4lUknpHGOPf7WM/lMPSIXy9Xmzut3j x9e3qCVvrr8nH3RiKfj7CzfxwY3sryHCqkgxoD5C1fr+wlYH1rB/iVqf+Kn96U8ACatO 5WiT3vvyGE/gWM2KyP4qodPKQBTvRg1ldFYsQF9PoHi5Qz93Aye8KUrWpQJxrBwCUSxj ZT3PUWj/3C3ggpoOWStFfVQYj4h4yBZ004rr1WswbTrxOwujIouvHP2vMtv0Wh/IlJ/P 2Gog== X-Forwarded-Encrypted: i=1; AJvYcCWp+ucC8e+dXZeYxaA8Q3rwoSTVXE6ICvuhKliyDPADshKpOO6hNuhv+y+fT0XrB4TOZ13YckBlU5l41g6E@postgresql.org X-Gm-Message-State: AOJu0YzoWErj64iWOJo1ZGbsMRIva9bSnTvJAnUYBWr5G6HEsv9Pr9Je hE7/UJ04MF2HXMcIMZ/3wA+Zv1BgofCAzskX2SUuLrd07BbuvXFRVs85XG/pl3sHjCusjqT0sOO C049ZiRelauiDu1+ib2qBj8z46UN5aaD5Gp2Z X-Gm-Gg: ASbGncvYJh0buroIGeAcBvP49CFE7bhjUt6QUNrk6qj7xovX8udtzE/wX7jdZy/bFWg UsqLGpXsq1zBt8KXknUlxaxKG+juY/V2ucuSbFY9fWGt3lXYVELGcqVdkjWJ1SD2DiMLPXVa9YG XefvWjdZWiwQ8Gwvd1SKpAwmr0Ys06dXSh/s9t4NHGwHgcf+luOZtKTbsOGSTG/V/blv0FB3bg3 nL2Q+aBF1EFYZ6moRqI91Ea5FjhKRA= X-Google-Smtp-Source: AGHT+IEDmhzZ9KNRKjsr4YzJZoOSAOoIOa+Z2L6TT/5Lmwt3bNQU1V/MdBShyqv2/gUU08hfQiynCH/58lDVDuUyaB8= X-Received: by 2002:a05:6870:d187:b0:2d6:2a40:fb9d with SMTP id 586e51a60fabf-32e572ed68fmr1467055fac.28.1757687327815; Fri, 12 Sep 2025 07:28:47 -0700 (PDT) MIME-Version: 1.0 References: <77a63548783dd4007ee479a4c5ed300629aaa776.camel@cybertec.at> <2109533.1757686026@sss.pgh.pa.us> In-Reply-To: <2109533.1757686026@sss.pgh.pa.us> From: Dominique Devienne Date: Fri, 12 Sep 2025 16:28:36 +0200 X-Gm-Features: Ac12FXzjQimoDjK6fYSj4_wDByZwrctpYiecE5qQoUO4DGSjxjLWxV62ZQAxqVA Message-ID: Subject: Re: Latest patches break one of our unit-test, related to RLS To: Tom Lane Cc: Laurenz Albe , 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 4:07=E2=80=AFPM Tom Lane wrote: > Dominique Devienne writes: > >> This DOES look like a bug, no? I've done regexes for a long time, > >> and these two forms should be equivalent IMHO. --DD > > Yeah, I agree it's busted. You can use EXPLAIN VERBOSE to see the > translated-to-POSIX pattern, and it's wrong. Thanks for confirming Tom. And teaching me about that EXPLAIN VERBOSE trick. I've worked-around that regression in our code, going to (x|y) instead. What's weird is that those are still followed by _ and %, just like [xy], so it's as-if seeing [\d\w], it stops converting the pattern... Weird. This misadventure kinda tells me I should maybe give up on SIMILAR TO and just use ~, to bypass that conversion-to-POSIX... --DD