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 1ux4Hr-00AQQg-Nh for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 13:58:03 +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 1ux4Hp-001V8U-14 for pgsql-general@arkaria.postgresql.org; Fri, 12 Sep 2025 13:58:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ux4Ho-001V8K-LK for pgsql-general@lists.postgresql.org; Fri, 12 Sep 2025 13:58:01 +0000 Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ux4Hl-000QOI-2Q for pgsql-general@postgresql.org; Fri, 12 Sep 2025 13:58:01 +0000 Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-43b40cc73f3so1089310b6e.0 for ; Fri, 12 Sep 2025 06:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757685477; x=1758290277; 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=W53YzJFjLIRlLivznB0xNS4udjmS/vjLi1/5D6ilPs0=; b=JTI2OhsbAG/Xarj3abbm3u0mqLuLw5HithooaXIxn5uPbPNDBvAOHZyJwF1CGUbtNT Pwu5UgTJoX82QvyqU4c3a43EsxMOLcEonYJ87Q6DEXil4Tg11bVGTJYZoHQ6biNBgEfR +UZJ6oAmWfzfihvk1n9KQx7aDWwkTCUy/M4aANzDFoTgnAIhOFyT8aI3OVYUlcSPbqhr HAsby9p5ZvGJHo0aVRQLr+3y3n0IwUML6k4DV1F9NGtJoJI2AmopADgJM/oW/yJ7qwwN EkKZGoXZoVFTZtz50uyMBnOTM6zEgGcet7W7ABZ/DV3RmQcAB1/3OHdE4P5cwZPkMJm9 FZ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757685477; x=1758290277; 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=W53YzJFjLIRlLivznB0xNS4udjmS/vjLi1/5D6ilPs0=; b=klDQyRYwuRbb9SFsNKdwRSqbvXXg6aehdUbqBQUIk4T5d27t5oIOd7rxq03LzvzwIa uPosdD+JqoWCdV11oQuPLV6xmalQWVs2a7zZr/K40LDlqCTRfAyTvSgMroENQjzDhKjp 5WM9cHLS+RdTT9o917hHxScmiXc8+0kbi5VbQ9ZDbkk/+feitDRNG2L+LF87jUUuqa5/ UHH9HCI4tVD0pyGk3sYJsJxRYt+r0aeXIudwiOS7NI1VfwaEk1E/C7liuYBYuWX3mbPR Oiqy3NrtMHuADFWs2iT+LEydLjt4Fj25awEUbk5hj0iCB74+lsaRzUn4/Eeq+WaKSm0k T4ug== X-Forwarded-Encrypted: i=1; AJvYcCVnedjvA2gDdnh1khanKb3NPTOBdprojofZ58Uy33vvIBnyFheuOj02aA0G+1eVZivY6fouvY5aKxcurgFz@postgresql.org X-Gm-Message-State: AOJu0Yx3xniqCTyHZTdcBlvQEoxWm9Q/4FYJFeKUXufTvoBp8ZyXDer4 xs+rOOctELvwJ0TWWsmc1Mf9a/Zi/AUIL12nhFse7C9zoCsvJAjafQ4MdbDdHBvOLOhE5rDl+8K dLH68vjQxMYXcuh8iQKaXxSM8cPnCpHI= X-Gm-Gg: ASbGncuaQrIgAP5MBVUpssbgRhOYkayAJ2YLsQw2dOqgwx3xp6b/AJJuN32ikCqMrjo aTIkodM0LfOqXAcKe1ymMn1wwgdU8kxERMQ5PrCxO3jfml5Y1D280qTkfCU4MQegPmoMgP+LwjM CxHC3VfZj/hgMoIBpwo1M58UfznDTmCsVUkcBvgNqYBIgnvtxU9jzhyyVVzH1zKT4nEFCXBh7nZ 0BaURs1zXurQbOa9oIY X-Google-Smtp-Source: AGHT+IFbAR86rpYoS/xsIeVuhFYbhZ7IQehXTGGFoSjIoeRfIutBIi27jKMUCb/bwFSpTVQGUDKkqY7p+wGhLrstkOo= X-Received: by 2002:a05:6808:2124:b0:438:1ca3:11f0 with SMTP id 5614622812f47-43b7baf3fe4mr3286804b6e.10.1757685476744; Fri, 12 Sep 2025 06:57:56 -0700 (PDT) MIME-Version: 1.0 References: <77a63548783dd4007ee479a4c5ed300629aaa776.camel@cybertec.at> In-Reply-To: From: Dominique Devienne Date: Fri, 12 Sep 2025 15:57:45 +0200 X-Gm-Features: Ac12FXxj2Xx0uCsVeX3ne_RD21Bou4yD5s-T9oPoNFkbjCr-rnss9Pcvu1D2Rig Message-ID: Subject: Re: Latest patches break one of our unit-test, related to RLS To: jian he 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 3:54=E2=80=AFPM jian he wrote: > > > select v from t where v similar to 'foo[\d\w]_%'; > > > select v from t where v similar to 'foo[[[:digit:]][[:word:]]]_%'; > The above two examples are the same, per > (Table 9.21. Regular Expression Class-Shorthand Escapes) Of course. > my guess why 'foo0bar' will fail for 'foo[[[:digit:]][[:word:]]]_%'; > 1. process character 0, it does meet [[:digits]] character class. > 2. process character b, it does not meet [[:digits]], then fails, > it won't check again whether character b is satisfied with [[:word:]] or = not. Then you don't know what [...] means in regexes I'm afraid. --DD