Re: automatically generating node support functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: automatically generating node support functions
Date: 2022-07-09 16:58:50
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Here's some follow-on patches, as I threatened yesterday.

0001 adds some material to nodes/README in hopes of compensating for
a couple of removed comments.

0002 fixes's rather badly broken error reporting.
As it stands, it always says that an error is on line 1 of the respective
input file, because it relies for that on perl's "$." which is only
workable when we are reading the file a line at a time. The scheme
of sucking in the entire file so that we can suppress multi-line C
comments easily doesn't play well with that. I concluded that the
best way to fix that was to adjust the C-comment-deletion code to
preserve any newlines within a comment, and then we can easily count
lines manually. The new C-comment-deletion code is a bit brute-force;
maybe there is a better way?

0003 adds boilerplate header comments to the output files, using
wording pretty similar to those written by

0004 fixes things so that we don't leave a mess of temporary files
if the script dies partway through. perhaps could use
this as well, but my experience is that genbki usually reports any
errors before starting to write files. not
so much --- I had to manually clean up the mess several times while

regards, tom lane

Attachment Content-Type Size
0001-readme-additions.patch text/x-diff 1.9 KB
0002-better-error-reporting.patch text/x-diff 3.6 KB
0003-add-copyright-boilerplate.patch text/x-diff 2.0 KB
0004-clean-up-on-failure.patch text/x-diff 2.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2022-07-09 16:59:23 Re: doc: Clarify Savepoint Behavior
Previous Message David G. Johnston 2022-07-09 15:52:46 Re: doc: Fix description of how the default user name is chosen