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 1vsw9X-009d9b-0a for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 05:00:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsw9V-0028F7-0B for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 05:00:37 +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 1vsw9U-0028Ee-2Z for pgsql-hackers@lists.postgresql.org; Thu, 19 Feb 2026 05:00:36 +0000 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vsw9S-000000005V3-049T for pgsql-hackers@postgresql.org; Thu, 19 Feb 2026 05:00:36 +0000 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-823210d1d8eso274317b3a.1 for ; Wed, 18 Feb 2026 21:00:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771477232; cv=none; d=google.com; s=arc-20240605; b=hmiVWS4MqOV5wk/b8Gy6KDo0xA6eHxqs3CPklro8dC9zOlCP6e/PyKxYr1dqrs0aWy R1PR0CXAWZd8eIKN2NFBDRnVvus62ZPES221tmI6kcvjtOQHVQxJY/4vmqb6CxEPCi+t O0VIHy7sTKA4/w18EVfhuzNU9aeeLauW6UBeFKZZv5OAprJXY72ggy7HuZnwczuJXTFT 6e57in7+dsCoDYS4EZwLoVNTHuk+rOTeL/SaTppH9AgzZU/4IvCPB2jzIo6PCTRgrg5T zW/vyUmaOJt7SplheUCjXQE1WC0gXLEz4hcJy1qjDl+F13TKWH1TvOCt2CfKuVChYnVv x7sg== 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=2MZ+YT5YyP8qcnMZIcyCQEGN8ufRT72anYF/1Bl1VCc=; fh=GuwGSte8zks8APLOOX2Vn1FW8C08F1P64Fq6p7Z6UfM=; b=U37on8hRRufGhi/otXHzugrc+yChuTOycgoRhta/6iZiqIGpHy81fKFHJinO0sjQFW WqC/6Qvs3iPInuHV/h//mhotZ184wcfaLX5I5hPlyqDn99ag5JxMQ8LUY42LASH3cL9r r1tPYnSNEeAH9/3+9Xxe64fUNud2Ce+EXI3Bz1Qm92/FhC2qWju2zBR0vZBiyZFinN8s nAuY14GJ5klTGolHyPE1WhsKoFxMyRsrDtRFg3hHZsmMfdeYEHRYb+q+PPm/5Js23zf4 Vq4DPP5hGkiAIGzdfwGdZJfX3YbO6GgRZlvy+IGZ7t5pef8J0ncdtzGt1+qxJp4SDyhF pneQ==; 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=20230601; t=1771477232; x=1772082032; 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=2MZ+YT5YyP8qcnMZIcyCQEGN8ufRT72anYF/1Bl1VCc=; b=H3Hc4JIk4ejywpVyGclTdyz1Tnwnrd+ogz6hHWhuC96l5WRpex2o/TOBhe/n20WBk7 qsX03otwvWaauKPLYNHlIetqfULIdCqZgTYcPQowQ51/1Ft5xFNqgX+xmDok+bDctuiG yzU/dcTOa+kxHZZurY5ZQ6hWTETdth6I5/BDa6l9bofbB0dopg2NtqjUDnGHcP0zPiGa aTriU/+di8h+n178nZSbbZJTnEkUbUMRpSKR79ZcQZXlfUOwXIoc8RPqwDt7eh0din6+ N0BhZfXKfClHEh2R47R8NkBgci04vraXXfM0REyDFCkRnGqKsU2cbPnIqH8+y3pMfVtX qH3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771477232; x=1772082032; 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=2MZ+YT5YyP8qcnMZIcyCQEGN8ufRT72anYF/1Bl1VCc=; b=kG2R2dva/p7PfC2WyoFo+RR7ZxndCSs24KsYiv7xCAVA1l3PoqDcOLkvxIIDUjICqq R1zonoUDAjCfPHyXyutWQkyudz18G7fZ34Xf/gcpYb/MLcChveKF4ErBNz9b3+GAm8r3 0mtE2RBpKrqSBI3HsoR1InKJIVdWl9NPU5MGULTViMeM0Q4LAdEwIhkgnMnv9Haf29wg v4yfK2aE4gcSjRZPT/V6HBVkM37fuPNCwCl1syKd+s4Mw3y+bmM2yR209K7iV6ZFOETc mURNLYrF0mGvby14QQ7bCue2bH/FgWp7itUjGyj86OrXES/YZjwExUFJfgfT+r0Gcmen GSUw== X-Forwarded-Encrypted: i=1; AJvYcCWo1SL4eaeJY4InZZyTl2JK8GcjdG2rKfpFgqUkBIZE0nx9EaquurSKOxx8MUPF/MwD9RuF4ig+CNXoIiP7@postgresql.org X-Gm-Message-State: AOJu0YxzjzT/O2ZMWl6HGCu+iOyV1jZiNfMR7NA4efdfLNMCBmZr8FIC Wxthe1lGH4t6AcJnxanQmHU/qAKdqu8yqFJmdGaZIUNb77ayws4PBn99N9Sl+TsqYGFUA95G0Sd e8r/1s1hhXzK8x0DNcBodwiwE7J2OyTY= X-Gm-Gg: AZuq6aKRWMzo68Vyv0hRncAk+QclgVx2tRw1ARzNbmNzIqda7reqEpJtvjUSBbh7p+g mBV7j6/WT+U4YFBE69IJ274VXE/gh8jJgXonv0L5QGdahOsqL1moaQEyPP1yAgD1aTGqq4wqp4Y +/QiCgyVM+xXQ9kgq3as8cnK9UKOdVe1bhRNl3E5VEZfNvwgU0b+v//kEmNwd9Cmf8wzA6rHs0H 1Nw2W/Q1qjh20wdOjNoQCMwFqYCYQy9ksMd5ihjhp7moF6nMbkoGsvgHv0KiZoNhXnjx2sfv9LA Hj076KHz7971PfWHsCI5PaF0CL1OWrotUECKQ6w= X-Received: by 2002:a05:6a21:38c:b0:366:14ac:8c6f with SMTP id adf61e73a8af0-39483a13719mr15700966637.69.1771477232172; Wed, 18 Feb 2026 21:00:32 -0800 (PST) MIME-Version: 1.0 References: <20260214.092310.1353606038244245395.ishii@postgresql.org> <20260215.180652.676783304925959084.ishii@postgresql.org> <20260219.134751.1095180149902968829.ishii@postgresql.org> In-Reply-To: <20260219.134751.1095180149902968829.ishii@postgresql.org> Reply-To: assam258@gmail.com From: Henson Choi Date: Thu, 19 Feb 2026 14:00:21 +0900 X-Gm-Features: AaiRm50xyVW0KVC0XYzeXmXDFtJoJf1h1O8PnONWQYQGwqGNDXdy4hnFX_I-img Message-ID: Subject: Re: Row pattern recognition To: Tatsuo Ishii Cc: vik@postgresfriends.org, er@xs4all.nl, jacob.champion@enterprisedb.com, david.g.johnston@gmail.com, peter@eisentraut.org, pgsql-hackers@postgresql.org Content-Type: multipart/alternative; boundary="00000000000026c436064b262ff9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000026c436064b262ff9 Content-Type: text/plain; charset="UTF-8" Hi Tatsuo, I noticed that current RPR patches allows to use PREV/NEXT anywhere in > an SQL statement where normal functions are allowed. According to the > standard, PREV/NEXT are only allowed in a DEFINE clause. Attached is a > patch to follow the standard regarding PREV/NEXT. > Thanks for the patch! I applied it to my local branch and all regression tests pass. Best regards, Henson --00000000000026c436064b262ff9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tatsuo,

I noticed that current RPR patches allows to use PREV/NEXT anywhere in
an SQL statement where normal functions are allowed. According to the
standard, PREV/NEXT are only allowed in a DEFINE clause. Attached is a
patch to follow the standard regarding PREV/NEXT.

=
Thanks for the patch! I applied it to my local branch and all
regr= ession tests pass.

Best regards,
Henson=C2=A0
--00000000000026c436064b262ff9--