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.94.2) (envelope-from ) id 1u7HNU-00DwFw-FG for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Apr 2025 17:25:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u7HNR-00GTGB-PM for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Apr 2025 17:25:46 +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.94.2) (envelope-from ) id 1u7HNR-00GTG2-Gs for pgsql-bugs@lists.postgresql.org; Tue, 22 Apr 2025 17:25:46 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u7HNP-001RnE-0F for pgsql-bugs@lists.postgresql.org; Tue, 22 Apr 2025 17:25:46 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 53MHPgSk1006505; Tue, 22 Apr 2025 13:25:42 -0400 From: Tom Lane To: clemens.ruck@t-online.de cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl" In-reply-to: <18901-424272abe01357e6@postgresql.org> References: <18901-424272abe01357e6@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Tue, 22 Apr 2025 16:39:46 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1006503.1745342742.1@sss.pgh.pa.us> Date: Tue, 22 Apr 2025 13:25:42 -0400 Message-ID: <1006504.1745342742@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > While implementing some things in my own branch of the Postgres 17.4 branch > (REL_17_STABLE), I encountered a possible bug in the perl script > "src/backend/nodes/gen_node_support.pl". I have a struct declared in > primnodes.h, which had some fields annotated with the pg_node_attr() > modifiers. After that, i had some in-line comments("//") as reminders for my > self, why i put the fields in the struct. The perl-script starts freaking > out if you do that, as the "read input"-loop does not know how to handle > "//"-comments after a struct-field. (Example: "Expr xpr; //Node supertype", > the script never finds the ";" semicolon at the end, because "//"-comments > are never stripped.) // comments are against our project style, so it's not terribly surprising that gen_node_support.pl doesn't cope with them. While I wouldn't stand in the way of someone making it do so, we're not likely to consider this a bug. > Also, if i may, the error reporting in that script is horrible. What does > "runaway in file "nodes/primnodes.h"." even mean? Yeah, that could be improved. It means it didn't find the closing brace for that struct, but at the very least it could give you a line number. regards, tom lane