pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
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"
Date: Tue, 22 Apr 2025 13:25:42 -0400
Message-ID: <1006504.1745342742@sss.pgh.pa.us> (raw)
In-Reply-To: <18901-424272abe01357e6@postgresql.org>
References: <18901-424272abe01357e6@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> 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 <struct_name> 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





view thread (2+ messages)

Message-ID: <1006504.1745342742@sss.pgh.pa.us>
Permalink:  ../1006504.1745342742@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1006504.1745342742@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, clemens.ruck@t-online.de, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl"
  In-Reply-To: <1006504.1745342742@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox