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.96) (envelope-from ) id 1wK6r1-000bRU-0I for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 03:53:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wK6qx-00A0C0-2t for pgsql-hackers@arkaria.postgresql.org; Tue, 05 May 2026 03:53: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.96) (envelope-from ) id 1wK6qx-00A0BY-1I for pgsql-hackers@lists.postgresql.org; Tue, 05 May 2026 03:53:47 +0000 Received: from mail-vs1-xe35.google.com ([2607:f8b0:4864:20::e35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wK6qu-00000000FXj-2Py4 for pgsql-hackers@postgresql.org; Tue, 05 May 2026 03:53:46 +0000 Received: by mail-vs1-xe35.google.com with SMTP id ada2fe7eead31-60fbbac2938so2121375137.1 for ; Mon, 04 May 2026 20:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777953224; cv=none; d=google.com; s=arc-20240605; b=bduYet29PWt2bDLJtS8ouK6iCJU63cSwuAcdHhIok/nwYObXqWTryySENuBoIisahj FLvjK5rBP80g/mnHW8ossEaClsxIf5pdmKjB9Opcmkr2q9WHDnv+YqOjPcfDMLqxOoYn aXM+qf0DzkvvoeG3RkdPqCJ24WCb5k3oeJwminPiHrMISH1wVQw6Ac09TU/agLfEFFD6 P1QuzK94dyoYHjeKX5c71ntkVYkehBZ7GXEuC0OlZyo9OmZs2X7ltXapPbOCWMSUBick /9DyfcuaM2rjjrU3VnRPWmIYZGQVtrOFE4XvTlApgrxC3Qu6OWl2dQVjiAo6Zha6GiFj N1cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Zp9uaS8Elztrf6jZJIX6aMCcZP+8M3tMS+NxFJcEuYo=; fh=7b8Xm88qPWBk9+rMrq6yfSQ+I3W9AdknX8ilqgUHJow=; b=Cb27NV5Nqgj8sZ5MfR+jXq6DKfd45HtjfdbDk1CYYzBwLZxfCR7RQi2UbOapJgKgpn fods2Ep/OXYE9AF9FgbIoZ/nQQZiX89GEX9PNtO6yK9n3sdk7/fF9buzlRZPPQ9Ve5vq AJAxPUM+QlqaKPM/fhXv11hSxdYyDuMfN0op/TiFojMmYtoHuitqrGXgl5cG1xGrMjP8 IHOfWvzhboJBIWKTkc1zKcDq2JO/Br+uLltmAA1HtzfYLLVz0kUU//ij9bbYuX6qlaem sqYzSdRPxbS/ifgV5Ac5CUoB+xl6VBpGEpONU8ISPPPGluM9SbdZ6e5do3ZU0IxS/cDh ML4A==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777953224; x=1778558024; 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=Zp9uaS8Elztrf6jZJIX6aMCcZP+8M3tMS+NxFJcEuYo=; b=bdk2PoAtWgYwH81osFIjWZutBywGEE5XNLGrz1s2T5lYEgcNNq+nRp6w30QhqMWaoX NacTmtPvzKQj6aMByPNfJSd6rU7+Qsl4wJknscNimEf40pSW8ycDRP5VCkZosx3uVXrU s5AcKslDva5m1Oehwvl2SrVmOiTMW2r7vkx+lXNde8jrfVdtbAQGlKU6E2hFbUT1pjvy jVe1hB+CBpcppY4T8wOBdS0hjQs/qeOAHnZ8op71GT8R/SAQzyLWbBYHNL5CUr+/l7JJ zwRc4DkCg1PFFir0ailrAkI6wVdhy4tPw9b0Er/r0HrDYFgpS5+mG+gxJ+YWEzTy6IwU AD0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777953224; x=1778558024; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Zp9uaS8Elztrf6jZJIX6aMCcZP+8M3tMS+NxFJcEuYo=; b=B0zuDk02+nsVRtdQyBl+yTrpyC4DZbz1bGUqjHus+uONJr31IowHxGYbUdmZVyskwu XgLTI9ERRcSzVuUZ405vUIU11sN45brvxjxyL4pAor2TcPQafu6Z1s5Y+dnyfAK+6rI2 lcbUjTEpTC2voKEWTA7TDrWsG8wvlQAOdXvvz/qjNmB9q79jJoQ+kwaMq7ltpNudDVDe 72U/YETtJgGaQ2oBW3hPiEDgE3QChQzqUcj/sOkNTKvexkADpkcuyDEmgyLlRrcS0Qj8 cRRupK+wZR7Zjs+K4T4a8hhdTrTvimMNG8a95EWIWc5IXMUhVDcZWbAmy06RuoSp+fwM 5OuA== X-Forwarded-Encrypted: i=1; AFNElJ9OPe0KpHS6wwrK4rik3ZEMR7EP2w8hUI38SD6UWnoFzFPB0ufciEhWcxcGSwwZm0Ja8H1HZglo4TJ4k0oI@postgresql.org X-Gm-Message-State: AOJu0YydYIzGHrXndroNUWY84nbAyswP7k13QFL+VU59pM1l0ss5cat9 TsvrhNHJaHkJh0pZC7FEZOxAhYDvZTDHKX2U6LjUr9kcVwcfEzOx8cnqCq4+mZQlPil/mzxWze5 WTboDMfeiNPHjq+6kFNgaJwt3+cX7c5U= X-Gm-Gg: AeBDietE5gys4bVvBHgRREwLc2vn7/MEuq+IkU4DyzuXrF/mPW0T6+FvXyK3GnOvlJQ sNLzlR6bFumkDk7a5pXQCLFkcJAVHfwV9YAoBiA/7L+vI3TgyrshfEV6B9C3Jq7ooEOiozUmWB2 0awFy5EOseLdnRtbE5JxbFuVjbnuaseHG/8LMB08Frc/ZIIJAo1dIEdqp6xoVZ6lHGf42Tr8cMc OKYzSUgf95hkY0h0MBj7TL3x8IyVH/VxwO1Gezvrq+TtnV10iMhsys+VjDK/C3yha9XSHuU3W03 xslWzcY7BHV0ECd2o0NcMowflbG7uBt9PJdGWMeGd5DSZqxzzf1/v3fq5PZnZ6FfT5RHFdVB4ub iS8Ey9GT7rrt/qwxsfDX7lFHmpBHrggJ78OtpeC7W67lKMLSLwpb/rL99n8kiYYjtUcHbHMYgz/ mNB8tp0sD+0WJc2eXwKFR+uRb+vJYXuLIE X-Received: by 2002:a05:6102:2b96:b0:609:4db5:de7c with SMTP id ada2fe7eead31-62d85ad9d4dmr5614306137.13.1777953224299; Mon, 04 May 2026 20:53:44 -0700 (PDT) MIME-Version: 1.0 References: <20260427.174220.1939160662649810289.ishii@postgresql.org> <20260502.140304.670813149418899420.ishii@postgresql.org> <20260505.090124.365339750969814137.ishii@postgresql.org> In-Reply-To: <20260505.090124.365339750969814137.ishii@postgresql.org> From: jian he Date: Tue, 5 May 2026 11:53:07 +0800 X-Gm-Features: AVHnY4KLp50k1d1n4rvqJ03YZT4HY681_SXLccQYtMwA-C1sQx9khCxhHLEbCYI Message-ID: Subject: Re: Row pattern recognition To: Tatsuo Ishii Cc: assam258@gmail.com, zsolt.parragi@percona.com, sjjang112233@gmail.com, vik@postgresfriends.org, er@xs4all.nl, jacob.champion@enterprisedb.com, david.g.johnston@gmail.com, peter@eisentraut.org, li.evan.chao@gmail.com, pgsql-hackers@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 Tue, May 5, 2026 at 8:02=E2=80=AFAM Tatsuo Ishii = wrote: > > > Attached is the v47 patches for Row pattern recognition (SQL/RPR). > Hi The patchset is too big, I only downloaded v47-0001... Just a quick skim of the code on my end. I noticed two code style issues, currently we don't have a code style reference in the manual. 1. We need to add trailing commas to enum definitions. See https://git.postgresql.org/cgit/postgresql.git/commit/?id=3D611806cd726fc92= 989ac918eac48fd8d684869c7 2. + | '{' ',' Iconst '}' Op + { + if (strcmp($5, "?") !=3D 0) + ereport(ERROR, + (errcode(ERRCODE_SYNTAX_ERROR), + errmsg("invalid token after range quantifier"), + errhint("Only \"?\" is allowed after {n,} or {,m} to make it reluctant.")= , + parser_errposition(@5))); + if ($3 <=3D 0 || $3 >=3D INT_MAX) + ereport(ERROR, + errcode(ERRCODE_SYNTAX_ERROR), + errmsg("quantifier bound must be between 1 and %d", INT_MAX - 1), + parser_errposition(@3)); + $$ =3D (Node *) makeRPRQuantifier(0, $3, @5, @1, yyscanner); + (errcode(ERRCODE_SYNTAX_ERROR), The leading parenthesis is optional and can be removed, fewer parentheses are always better. See related discussion: https://postgr.es/m/202510100916.s2e6n3xiwvyc@alvherre.pgsql Since v47-0001 introduces many ereport(ERROR) messages, it makes sense to move the related regression tests from the other patch into v47-0001, IMHO. -- jian https://www.enterprisedb.com/