pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl"
2+ messages / 2 participants
[nested] [flat]

* BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl"
@ 2025-04-22 16:39 PG Bug reporting form <noreply@postgresql.org>
  2025-04-22 17:25 ` Re: BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl" Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2025-04-22 16:39 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: clemens.ruck@t-online.de

The following bug has been logged on the website:

Bug reference:      18901
Logged by:          Clemens Ruck
Email address:      clemens.ruck@t-online.de
PostgreSQL version: 17.4
Operating system:   Ubuntu 22.04
Description:        

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.)

I have no experience in Perl, just wanted to let you know, i encountered
this bug, maybe someone more skilled than me can fix that.

Also, if i may, the error reporting in that script is horrible. What does
"runaway <struct_name> in file "nodes/primnodes.h"." even mean?

Best regards, C



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl"
  2025-04-22 16:39 BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl" PG Bug reporting form <noreply@postgresql.org>
@ 2025-04-22 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2025-04-22 17:25 UTC (permalink / raw)
  To: clemens.ruck@t-online.de; +Cc: pgsql-bugs@lists.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-04-22 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-04-22 16:39 BUG #18901: Bug in Perl-Script "src/backend/nodes/gen_node_support.pl" PG Bug reporting form <noreply@postgresql.org>
2025-04-22 17:25 ` Tom Lane <tgl@sss.pgh.pa.us>

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