From: | John Naylor <johncnaylorls(at)gmail(dot)com> |
---|---|
To: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Generate GUC tables from .dat file |
Date: | 2025-08-20 07:57:16 |
Message-ID: | CANWCAZai3Qmf_jnv2pv13AAz-ibBTVx7yuLLL6p8Y2ZBY_4o4Q@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 20, 2025 at 3:18 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> Ok, I did the big conversion, and tidied everything up so that it now
> generates the big tables in guc_tables.c from the .dat file. This
> basically works now.
> - One thing I didn't reproduce in the generated code is the line breaks
> in the description strings. But that should be ok either way.
It's certainly not worse than, say, some proargnames in pg_proc.dat.
> - In a few places there were complicated #ifdef's to determine the
> default value. I extracted that out into separate symbols.
Seems fine this way.
> - I moved the C code comments into the .dat file as Perl comments. I
> figure that makes sense as that's where people would be editing now.
That makes sense. I noticed some comments were not carried over. In a
mechanical change like this, I'd expect all comments to be preserved
in some form, or at least removed in the preparatory step so that the
change is more visible to others.
It'd probably take a bit of work to make format_dat_file.pl work with
non-catalog data. Maybe mechanical formatting is not so important here
because there is a smaller "schema", and less frequent change. Also, I
imagine we'd have more freedom to place perl comments if we know the
surroundings can't be shifted around.
--
John Naylor
Amazon Web Services
From | Date | Subject | |
---|---|---|---|
Next Message | Yugo Nagata | 2025-08-20 08:01:56 | Re: Prevent internal error at concurrent CREATE OR REPLACE FUNCTION |
Previous Message | Hayato Kuroda (Fujitsu) | 2025-08-20 07:42:11 | RE: ReplicationSlotRelease() crashes when the instance is in the single user mode |