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 1wS0Iw-002sTW-2x for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 22:31:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wS0Iu-0069SV-2m for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 22:31:17 +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 1wS0Iu-0069Rt-1j for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 22:31:17 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wS0It-00000001alM-1Adg for pgsql-hackers@postgresql.org; Tue, 26 May 2026 22:31:16 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-bcd0111ea98so1528812866b.1 for ; Tue, 26 May 2026 15:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779834674; cv=none; d=google.com; s=arc-20240605; b=RDMAugms5cpA2u6OqJhev9W52yiannr65Pics+tKs1ODTiXTGMPxepT2RggjE2NEiL hEWOoT5TVxlW9pcJObnOwSGZbvF0/KkpmIVkTm6zM0IG///sgCluWN9NXL2TQVmedZqd tyxcJYLkER0G80dA/waj6gfXzJRZs7trIJBPDu3R8NKdaqxShT0PjcQZtk0AjIQ6M6Ex EfwbERqkK2AmFmQqcsXi3VEJCLXWSgZ8FhI2E8o8M0uTgmPPzDV0OCec9mAMnCos+3OG R5a4bLWK+YIv3CpPwTrqqiblBUHjJHXS0VjfGsbX+3az1hCHBMxNewD+fPA1CZmNDgTP n4jA== 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=uXrWuGi5EC+62PyZBcEe11+AG5MnUUxTQ++c3Sq0bf0=; fh=D4ZN7CnOSPABYC+6NFd8fQtzk3+hX+VJy0N8h49u558=; b=Y9263Max89t10OFNJIb9jyV5cCrzud0JPmi3IqeDbnWVI2C5MXre42RkA5fUg/0FJx w83h9j2OZ9A+N4y/k4k65EOYCXHkvKzgorKm5nWA8TEbsYrH85nD4aAdPXLMIPCM5pHU rW1RWT1NHf2nZ6suu9nTfDOGWjnSIcmx2X9+++4S2DYt27GbN72oX7at50qKNDZ4yUSK ZuQoYh1meX5Zf2tyfeRuepHWJjI5PfXAVIHHmCQJhEt8HEEaE47MO5il+h4AIhrxbtfh 8uQL6T41iIctgNNk+bDcB0GCgTMCF0jmgjkpGCNnwUcd2uv9cti88vRIt2IkqQoQwARO Lmyg==; 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=1779834674; x=1780439474; 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=uXrWuGi5EC+62PyZBcEe11+AG5MnUUxTQ++c3Sq0bf0=; b=IDnedpK3pY15w5i+xsougT0ShTZImBnaZj4/byfP12hyDKfFeINIxX4/MHzZfkbtIv +YfvXzWf03yXpcYIgWL9HCTIVrDWmA+DRsV2DT0Q9FO8LPRDQb3WaUbjsoqiXG6VXwfj Wd6vii87ebHBbD8pIHCuiupfcK5vHMUs+Txx8t9Mq+B0d0JhX5iROrpO0hTEhbFis7ZW 4OetSA6fO5GrXsrlaTdNMa7EpicZc+XdDaeBGsWKuJMrTUm7XwbBhIQc4ovsE1lBRsxT zJk6aEpLH216Q4kjDkD4sxWN6xrQpK1mRzhzVjdko0f3gBJMpfA3XRtgmZHwL2emRi54 TsfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779834674; x=1780439474; 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=uXrWuGi5EC+62PyZBcEe11+AG5MnUUxTQ++c3Sq0bf0=; b=UTy3Lmoncvy0qYzV6MW+IlWYhc743hGRIhAwQfM5R6Nb2v07wazHAmQ67KZ2NrVNZl pT/m9P7V5Pr4ewm0h4ffS4SXSCb5BsFRv4pnVp9vYmgc52s1vw1ioc+rKbG4BMI5xC8s 4jcB62+zlaCGbJwlPm0rOZ55IuQfhnIY7JDIcqpQKi41/9ofHy4AioGiElp7ElZXx23v pjSquZUcsAfplnCwr5Kz+YfnPp2V6LZuBNP2DeWWS4sJAo/QHMVRgqO+bO2aPaf3R4dt xrrEAb3j3EnPzrfaHhAohWnLgmoajBgJuv5EVlAFoN/GzdTrxdbpl+XPQqwvPS2pjBkp NS0w== X-Forwarded-Encrypted: i=1; AFNElJ9eTNoqU374n+Pmd2BWk0CFC4L9OR6Mums0OgSGKC0wkeoxRGU7gBuznsLXCj6AivASsm+W1oO/mKEiFkRn@postgresql.org X-Gm-Message-State: AOJu0YwL7zdgM3c6ywU3WriLtYGGR14OtFcQNxnLLIIQbdkVv5QIrD+P UfvN45arBkmUk+sKTeATkigqRIewMkApUIws0rrWGwsdFTNUrYVA4+9hAevuEiybVdse4CAR0JH x/XdSUDElkyPbPH5Z2t0oMH8fl+hiQp0= X-Gm-Gg: Acq92OHmX3avzEJUfUmNHAycqs+YzSPRP1HZ0262ZItOZlfjCEyNrcscHl8bRm5jBJg bTCCUCvVmKND2RxRQvyb9RLiy2RpG8uybjt3GVf4czH3H8Mbzsh330p4/hhLRijfIaXwin92TRX 39uCr9nP+Abgw9hENC/jTeqkf0N7Qi8IjFcts9O/tgOsXfgEroXQtBKhdNnB5h3P27ttqhkZAbu QQVzCKXuPJ/yZgedM+S9uXGY47ueIWBLcELc+2MWSFCshXzmW530Te3uWmc2+rY6VScbNudk5im /tkUfJQZsZ7Bxg9JMGTjyAYsASR8peYT87xQk0OM X-Received: by 2002:a17:907:78c:b0:bab:e742:aba with SMTP id a640c23a62f3a-bdd2aee77e5mr1289649066b.42.1779834674020; Tue, 26 May 2026 15:31:14 -0700 (PDT) MIME-Version: 1.0 References: <20260427.174220.1939160662649810289.ishii@postgresql.org> <20260502.140304.670813149418899420.ishii@postgresql.org> <20260524.171139.1720602000749196206.ishii@postgresql.org> In-Reply-To: <20260524.171139.1720602000749196206.ishii@postgresql.org> Reply-To: assam258@gmail.com From: Henson Choi Date: Wed, 27 May 2026 07:31:02 +0900 X-Gm-Features: AVHnY4KrTtjSqJ1mot7vJuzhT82cojlt9IhYflmLyy4N_00xg3lproSIbTS1L_U Message-ID: Subject: Re: Row pattern recognition To: Tatsuo Ishii , jian he Cc: 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/mixed; boundary="000000000000813d2e0652c00de8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000813d2e0652c00de8 Content-Type: multipart/alternative; boundary="000000000000813d2d0652c00de6" --000000000000813d2d0652c00de6 Content-Type: text/plain; charset="UTF-8" Hi Tatsuo, jian, While looking into v47, I noticed that > raw_expression_tree_walker_impl() lacks tracking RPCommonSyntax and > its children nodes. Probably this does nothing wrong with RPR > functionalities but just for completeness I created a patch on top of > v47. Thanks for catching this. I applied the patch and the RPR regress passes cleanly. I also re-ran it with debug_raw_expression_coverage_test turned on (on an assert-enabled build), and the full regress is green as well. One observation while testing: the GUC catches missing case handlers once the walker actually reaches a node, but it cannot flag a missing WALK on its own -- if no caller drives the walker into a subtree, the omission stays silent. So your inspection was the part that found the gap; the GUC just confirms the patch closes it. With the patch in, RPR raw subtrees are on the safety net for any future node-type additions. I'll include the patch in v48 as nocfbot-0015. My suggestion would be to defer the fold until the jian-response patches (numbered from 0016 onward, which I'll be sending shortly) have also gone through a review round, so the whole bundle can land together in one pass. Patch attached below for convenience. jian -- thanks for the thorough review. It covers a lot of ground, and I'm still working through it. Current expectation is that most items will be accepted; a few smaller ones may end up with a different conclusion than your suggestion, and those are still under analysis on my side. The plan is to turn the responses into a patch series and send them out for another round of review. More to follow once the batch is in shape. Thanks, Henson --000000000000813d2d0652c00de6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Tatsuo, jian,

While looking into v47, I noticed that<= br> raw_expression_tree_walker_impl() lacks tracking RPCommonSyntax and
its children nodes. Probably this does nothing wrong with RPR
functionalities but just for completeness I created a patch on top of
v47.

Thanks for catching this. I applied th= e patch and the RPR regress passes
cleanly. I also re-ran it with debug_= raw_expression_coverage_test turned
on (on an assert-enabled build), and= the full regress is green as well.

One observation while testing: t= he GUC catches missing case handlers
once the walker actually reaches a = node, but it cannot flag a missing
WALK on its own -- if no caller drive= s the walker into a subtree, the
omission stays silent. So your inspecti= on was the part that found the
gap; the GUC just confirms the patch clos= es it. With the patch in, RPR
raw subtrees are on the safety net for any= future node-type additions.

I'll include the patch in v48 as no= cfbot-0015. My suggestion would
be to defer the fold until the jian-resp= onse patches (numbered from
0016 onward, which I'll be sending short= ly) have also gone through a
review round, so the whole bundle can land = together in one pass.
Patch attached below for convenience.


j= ian -- thanks for the thorough review. It covers a lot of ground,
and I&= #39;m still working through it. Current expectation is that most
items w= ill be accepted; a few smaller ones may end up with a
different conclusi= on than your suggestion, and those are still under
analysis on my side.<= br>
The plan is to turn the responses into a patch series and send them<= br>out for another round of review. More to follow once the batch is in
= shape.


Thanks,
Henson
--000000000000813d2d0652c00de6-- --000000000000813d2e0652c00de8 Content-Type: text/plain; charset="US-ASCII"; name="nocfbot-0015-RPR-raw-walker-coverage.txt" Content-Disposition: attachment; filename="nocfbot-0015-RPR-raw-walker-coverage.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_mpn78e1i1 RnJvbSBkYmVmZGQ0N2FiNjNjMDk5YjhjYjllN2E3YWYzOTA3ZWQyMjEyZGNkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBIZW5zb24gQ2hvaSA8YXNzYW0yNThAZ21haWwuY29tPgpEYXRl OiBXZWQsIDI3IE1heSAyMDI2IDA3OjAyOjM4ICswOTAwClN1YmplY3Q6IFtQQVRDSF0gQWRkIHJh d19leHByZXNzaW9uX3RyZWVfd2Fsa2VyIGNvdmVyYWdlIGZvciBSUFIgcmF3IG5vZGVzCgpXaW5k b3dEZWYucnBDb21tb25TeW50YXggd2FzIG5vdCB3YWxrZWQsIGFuZCB0aGVyZSB3ZXJlIG5vIGNh c2UKYXJtcyBmb3IgVF9SUENvbW1vblN5bnRheCBvciBUX1JQUlBhdHRlcm5Ob2RlLiAgUlBSIGNv cmUgd2FzCnVuYWZmZWN0ZWQgLS0gY29udGFpbl9ycHJfd2Fsa2VyKCkgaW4gcGFyc2VfY3RlLmMg aW50ZXJjZXB0cwpXaW5kb3dEZWYgYmVmb3JlIGRlbGVnYXRpbmcgLS0gYnV0IGRlYnVnX3Jhd19l eHByZXNzaW9uX2NvdmVyYWdlX3Rlc3QKc2lsZW50bHkgc2tpcHBlZCB0aGVzZSBzdWJ0cmVlcywg bGVhdmluZyBhbnkgZnV0dXJlIHJhdy1ub2RlCm9taXNzaW9uIG9uIHRoZSBSUFIgc2lkZSB1bmRl dGVjdGVkLgotLS0KIHNyYy9iYWNrZW5kL25vZGVzL25vZGVGdW5jcy5jIHwgMjAgKysrKysrKysr KysrKysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCAyMCBpbnNlcnRpb25zK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