| From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
|---|---|
| To: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org> |
| Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: gen_guc_tables.pl: Validate required GUC fields before code generation |
| Date: | 2025-11-25 16:00:34 |
| Message-ID: | 5f5b1d47-a801-4c82-8050-00e3c301ebc5@eisentraut.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 20.11.25 06:51, Chao Li wrote:
>
> On Wed, Nov 19, 2025 at 7:56 PM Dagfinn Ilmari Mannsåker
> <ilmari(at)ilmari(dot)org <mailto:ilmari(at)ilmari(dot)org>> wrote:
>
>
> > v3 goes back to v1 plus I add a check for unknown field type per your
> > suggestion, for example:
> > ```
> > error: guc_parameters.data line 2271: unknown GUC type 'intt'
> > ```
>
> We've already validated that the name field exists, so this error
> message should include that, like the other ones do.
>
>
> Make sense. I added field name to this error message in v4, now it looks
> like:
> ```
> error: guc_parameters.dat line 2278: 'primary_conninfo' has unknown GUC
> type 'string1'
> ```
Thanks, I committed this. I made some changes to the error message
format so that it matches the format recognized by editors, and to use
PostgreSQL quoting style (double quotes). I also removed some code
comments that just restated what was already obvious from the code.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2025-11-25 16:00:51 | Re: The pgperltidy diffs in HEAD |
| Previous Message | Nathan Bossart | 2025-11-25 15:50:16 | Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent |