Re: Add custom EXPLAIN options support to auto_explain
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Lukas Fittl <lukas@fittl.com>
Cc: Matheus Alcantara <matheusssilv97@gmail.com>,
pgsql-hackers@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2026-04-06T15:22:42Z
Lists: pgsql-hackers
On Fri, Apr 3, 2026 at 10:09 PM Lukas Fittl <lukas@fittl.com> wrote: > Maybe make it clear in the comment that the return value is > unterminated (e.g. "The return value is the unterminated identifier"), > i.e. caller is responsible for setting the null byte based on endp. > > Otherwise 0001 looks good. Thanks for the review, but I don't agree with that proposed change. To me, it seems too much like insisting that a function must document the things it doesn't do. Granted, saying "this function doesn't overwrite *endp" is a much more reasonable thing to document than "this function doesn't try to compute pi to 3,141,593 decimal places," because the latter is less likely to be something that the user would expect it to do. But I feel like the comment is clear enough as it is, so I've committed the patch without change. If more votes in favor of adjusting the comment emerge, we can certainly reconsider. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
auto_explain: Add new GUC, auto_explain.log_extension_options.
- e972dff6c304 19 (unreleased) landed
-
Add a guc_check_handler to the EXPLAIN extension mechanism.
- 0442f1c9eff6 19 (unreleased) landed
-
Expose helper functions scan_quoted_identifier and scan_identifier.
- e0e819cc08d3 19 (unreleased) landed