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 1wV6zN-001hKN-28 for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 12:15:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wV6zM-006QFs-1e for pgsql-hackers@arkaria.postgresql.org; Thu, 04 Jun 2026 12:15:56 +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.96) (envelope-from ) id 1wV6zM-006QFk-0e for pgsql-hackers@lists.postgresql.org; Thu, 04 Jun 2026 12:15:56 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wV6zJ-00000001EVQ-3NAd for pgsql-hackers@postgresql.org; Thu, 04 Jun 2026 12:15:55 +0000 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-68bd9fce347so1088726a12.2 for ; Thu, 04 Jun 2026 05:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1780575353; cv=none; d=google.com; s=arc-20240605; b=II6k9mHLTZs2SghRMLqao55sS3F8IVP1um6HNTY13HabrUt235oY14A66BPA6VdYmz EccpPt2o56po+LTB/ZM8UQoSrqIQwCpLp6NT3t7kja0FsUMQDFUahY/d3X55YHjPmjRL uHM8D596tLW4TgvYrUldIuHgHrcOr/j0So6/jSWdX9E8Tr+xtiaA/smhEKEB6vXNvUGG xRdzK5wOo771L/AhLYiqU1Oy+uELOgO8Trdnd1YRoOuaD232kdtPwFYmgjc0+4HVn54G Mp1o5Ci8ibBW3le6o91YJOqIrd70hPw5AyiT3rzxB1W6q1TOzpFdseKSIzx5cMJpa0bG o2Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:dkim-signature; bh=4flNGIbjG5JEsFhlFwEu6ZZKV3EX9u/qFVexnoefzNs=; fh=mZhDM54upKRPGHQtHV0o2tHFTEKZXaOwO4LYR2pwt7k=; b=OH02gXONscFdAedkb2qqlLObYK25SSJqd38laGx6ZrSBCR9m52LaaUo2o6bPkmJdL/ IXNKZrUkHE2Om0II5y6N2S7ZTUZZxchSDPOFreKd+3hBtY5Ys8oGgOhxTu1FwZFPpk8C zKgJ+Bm6wTVI8W+YOprxpTDfuMELDLlZGpDBtGuV95xsDYefLrfcCyf66oPDL3yF3FA5 A8qhkPY4IH6N4MyfrWBDU7gGpgsG+Is3nWkBDDAz2Rfw4qHKCbGX+zeyAE0D/Rf7aah9 zEffn2Te2bEmBL5yEaqrlZ2J6UwOSCM/ouUiBXkd8fvHOkKWMR5NxiQ8Ri4Ysgpw11ae 7GEA==; 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=1780575353; x=1781180153; darn=postgresql.org; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4flNGIbjG5JEsFhlFwEu6ZZKV3EX9u/qFVexnoefzNs=; b=n4xM/IdEIUVlEIlTLOM+nNIn4R3rhqXIfChnREwxc0cfAj1vIZKaCI4obYNkJ1qfNS od4D9gywY6PQdaQVN0FNfrChqSywTQg8A1Mv6MMztOYnupPst6z6yH+g/DHs/AO4bBEd Ew3N76PI/80Jl4AikzfBGZ0r26OLgpfa/bPB4u+6ZZCYM8Rs46u/hkuPOSgZKYknqlxf dNuRH5o0zLa1NI3tNNWzAX4j5QPG+DwmzQ7/5R/y9aOjMtIukqDr/eH6eXXZPWN14bDR QfpIY1D13vHhUbqFzUqWDqXbgQWmgZ7YaQ2mr932xwa1Urpw55sFbaZ2Pq1tI7/HOxfF 1rTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780575353; x=1781180153; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4flNGIbjG5JEsFhlFwEu6ZZKV3EX9u/qFVexnoefzNs=; b=RoPhZX8BRwvBMtz1sXOQzTtjK6wqk3pN0wcIHrsHlK3nQIJiiH3V80wxtGfZvjm3AD 0Y3WsV3Np25NPKaLkPNpVXpPKCJawsimX010B3B0PCB8VI8/4+xnseRsCbrcpJ5/wzTr qNsNxmfeH8VfPi6RwU5AR0aKnejHcN4NlAzf7ChzF7+qavHZA/Zdj+4jyGIMaxdzARjX PUUYiKY4LLeZCY5HAJHkWXd8jz+qrK9Ri43UEpb8robhN11C24jNk2VJeq9ckz72lknK 3VZUnadHOm2c6NDn4oAcEXY5OvzTETPgU24Bpnz/OhblZ5fij9FsaIQroqsowNeo/lV7 FHOg== X-Forwarded-Encrypted: i=1; AFNElJ+IA51lpECohSrF6Rp6cypfiYoEWDsHKFp4qaT7nPraJPqPwuV137olZiogiA0HCE9ZU8hnQOoRrzklYBq+@postgresql.org X-Gm-Message-State: AOJu0Yzy9BqWCQyUGiJGnGig/d/F1+vrTSY/BukRkLPMBjSnPiTS5p5T 3mvN0URV/Q+WMYSZvto4+pe0Z6/fWj3EePVKwb10AP85cMRf1q9NoTBsfMjADPycHBqfq4ZA4g0 ltYbsSycBDe9AaYDg8/p/0qTGFwdL8zw= X-Gm-Gg: Acq92OHQP3QDaIP8AL0rhJISbCzkmx7s4t9d73xbx2cRIY9SgNX3a1bBOhE7i5J1D0p Iw+wo2UuBKWqQFtl0GtT6RCP00Z/A9kA5EnoVsaowWiNiVFJf1M85hyrpSpLz585NsgaUnbeCVE AIe4PyykfqLwA36ewhMCaCKSVAFq+oDYumioR6UAdbuehU4gP0/DzBSJaS/w/TtHHa0JPefswtn OPZo8jDRTnkQUKrEow1XuvUqDnkdVlmZQwvymhDgurpap02VSIRgV8SZapHtndV4QWGR01bvb3s UHCwW54O8F7nBIgFy3hsZlBrV6BcfwHpDI5eXrQT7Ktz1hg6UDo= X-Received: by 2002:a05:6402:28ce:b0:68d:92cf:52f4 with SMTP id 4fb4d7f45d1cf-68e6f7935a1mr4053403a12.5.1780575352534; Thu, 04 Jun 2026 05:15:52 -0700 (PDT) MIME-Version: 1.0 References: <20260604.132108.405136284364833955.ishii@postgresql.org> In-Reply-To: Reply-To: assam258@gmail.com From: Henson Choi Date: Thu, 4 Jun 2026 21:15:40 +0900 X-Gm-Features: AVHnY4I3xWsZyhru89Q9gMLqpbaf227JMdTlCV9LtHVPawaK2Oqld7DWG5nu5x0 Message-ID: Subject: Re: Row pattern recognition To: jian he Cc: Tatsuo Ishii , 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: multipart/alternative; boundary="000000000000623c7106536c81f5" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000623c7106536c81f5 Content-Type: text/plain; charset="UTF-8" > Please check the attached regression test refactoring and gram.y changes Thanks for the patch -- the substance all looks right: the gram.y reformat is a fair consistency fix, the ecb2508aaf convention (no hardcoded error text in regress comments) is one we should follow, and the added coverage (split-token quantifier errors, SRF in DEFINE) fills real gaps. I'll work these in together with the patches I'm lining up right before the v48 merge, rather than mid-stream -- the large "Expected: ERROR" comment cleanup would otherwise churn against the other test edits still in flight. They'll all land in that v48 round. Answers to your three questions: > In src/test/regress/sql/rpr_base.sql, wording such as ``Jacob's > Patterns`` should be removed? Those came in from Jacob's branch, but agreed they're better changed: "Jacob's Patterns" / "from jacob branch" are dev-time provenance notes, not something to keep in committed tests. I'll give the section a descriptive header (the tests themselves stay) and do it together with the v48 round above. > -- Serialization/Deserialization Tests (objects kept for pg_upgrade/pg_dump) > I am not sure what this refers to. Those are views (with RPR in their definition) left undropped on purpose, so the pg_dump/pg_upgrade tests pick them up: dumping and restoring the regression DB deparses the RPR window clause and re-parses it, exercising the serialization round trip. rpr_explain.sql keeps one for the same reason. I'll reword the comment to say that. > errmsg("quantifier bound must be between 0 and %d", INT_MAX - 1), > errmsg("quantifier bound must be between 1 and %d", INT_MAX - 1), > Will these cause consistency issues? No, it's intentional. INT_MAX is the unbounded sentinel (RPR_QUANTITY_INF), so an explicit bound is capped at INT_MAX - 1 to avoid colliding with it; the "0 vs 1" split just matches each form ({n}/{,m} need >= 1, {n,} allows 0). Regards, Henson --000000000000623c7106536c81f5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Please check the attached regression test refactoring= and gram.y changes

Thanks for the patch -- the substance all looks = right: the gram.y reformat
is a fair consistency fix, the ecb2508aaf con= vention (no hardcoded error
text in regress comments) is one we should f= ollow, and the added coverage
(split-token quantifier errors, SRF in DEF= INE) fills real gaps.

I'll work these in together with the patch= es I'm lining up right before the
v48 merge, rather than mid-stream = -- the large "Expected: ERROR" comment
cleanup would otherwise= churn against the other test edits still in flight.
They'll all lan= d in that v48 round.

Answers to your three questions:

> In= src/test/regress/sql/rpr_base.sql, wording such as ``Jacob's
> P= atterns`` should be removed?

Those came in from Jacob's branch, = but agreed they're better changed:
"Jacob's Patterns" = / "from jacob branch" are dev-time provenance notes, not
somet= hing to keep in committed tests. I'll give the section a descriptiveheader (the tests themselves stay) and do it together with the v48 roundabove.

> -- =C2=A0 Serialization/Deserialization Tests (objects= kept for pg_upgrade/pg_dump)
> I am not sure what this refers to.
Those are views (with RPR in their definition) left undropped on purpo= se,
so the pg_dump/pg_upgrade tests pick them up: dumping and restoring = the
regression DB deparses the RPR window clause and re-parses it, exerc= ising
the serialization round trip. rpr_explain.sql keeps one for the sa= me
reason. I'll reword the comment to say that.

> errmsg(&= quot;quantifier bound must be between 0 and %d", INT_MAX - 1),
>= errmsg("quantifier bound must be between 1 and %d", INT_MAX - 1)= ,
> Will these cause consistency issues?

No, it's intentio= nal. INT_MAX is the unbounded sentinel (RPR_QUANTITY_INF),
so an explici= t bound is capped at INT_MAX - 1 to avoid colliding with it;
the "0= vs 1" split just matches each form ({n}/{,m} need >=3D 1, {n,} all= ows 0).

Regards,
Henson
--000000000000623c7106536c81f5--