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 1wR3wT-0025Ag-1d for pgsql-hackers@arkaria.postgresql.org; Sun, 24 May 2026 08:12:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wR3wP-00Gg8I-2t for pgsql-hackers@arkaria.postgresql.org; Sun, 24 May 2026 08:12:10 +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 1wR3wP-00Gg89-1o for pgsql-hackers@lists.postgresql.org; Sun, 24 May 2026 08:12:10 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wR3wO-00000000WvY-2D3M for pgsql-hackers@postgresql.org; Sun, 24 May 2026 08:12:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=jX4sUr8Na/0AlVpvn3jvuBcvMz0iPP6AkwgGQ3Bzibc=; b=DqcbAvYj+NKbZHaGXxxv9GrXjN 3aVU2yD4dBA+jOk/DcIv7RCCKuQISlz0SIXIlxhQkrbz8zxZP0Gp5vr1gsNIW9drk/CjCH56u2fUe IOcYNRxjrtQw/cpqHnYjsKTQZEM0b+hopv0f6H7hH0L5ZUYqeg12/9jTr3EHpuONZRj+KQb7RsC1v sRy80qtviXEHsI10nZrSydSxDo6XN5wDuiA3zwkMheAOeAMR1ZvMJP7gtNtIwWFFd2h3Q3jqffJHR K6IMTNKxjt00SMH07r53Tp2dbUO42lMAXX3TuwCQulwDjNF4KHsN8ALTDsnCZKfuJZCteMLQKa51r U/XeK9Rw==; Received: from [2409:11:4120:300:cb96:eec6:45b0:3139] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wR3wD-002jJB-1Y; Sun, 24 May 2026 08:12:02 +0000 Date: Sun, 24 May 2026 17:11:39 +0900 (JST) Message-Id: <20260524.171139.1720602000749196206.ishii@postgresql.org> To: assam258@gmail.com 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 Subject: Re: Row pattern recognition From: Tatsuo Ishii In-Reply-To: <20260502.140304.670813149418899420.ishii@postgresql.org> References: <20260427.174220.1939160662649810289.ishii@postgresql.org> <20260502.140304.670813149418899420.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 29.3 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Sun_May_24_17_11_39_2026_794)--" Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:cb96:eec6:45b0:3139 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Sun_May_24_17_11_39_2026_794)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi Henson, > Attached is the v47 patches for Row pattern recognition (SQL/RPR). 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. Regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp ----Next_Part(Sun_May_24_17_11_39_2026_794)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="raw_expression_tree_walker_impl.txt" diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 651d049cfa2..c8694726e3c 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -4612,6 +4612,8 @@ raw_expression_tree_walker_impl(Node *node, return true; if (WALK(wd->endOffset)) return true; + if (WALK(wd->rpCommonSyntax)) + return true; } break; case T_RangeSubselect: @@ -4865,6 +4867,24 @@ raw_expression_tree_walker_impl(Node *node, return true; } break; + case T_RPCommonSyntax: + { + RPCommonSyntax *rc = (RPCommonSyntax *) node; + + if (WALK(rc->rpPattern)) + return true; + if (WALK(rc->rpDefs)) + return true; + } + break; + case T_RPRPatternNode: + { + RPRPatternNode *rp = (RPRPatternNode *) node; + + if (WALK(rp->children)) + return true; + } + break; default: elog(ERROR, "unrecognized node type: %d", (int) nodeTag(node)); ----Next_Part(Sun_May_24_17_11_39_2026_794)----