Re: Add custom EXPLAIN options support to auto_explain - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Add custom EXPLAIN options support to auto_explain
Date
Msg-id CA+TgmobjYqq-s10BHtDDwBZtKFrN1WjK75Sai95=Lq77hWpXsQ@mail.gmail.com
Whole thread
In response to Re: Add custom EXPLAIN options support to auto_explain  (Lukas Fittl <lukas@fittl.com>)
List 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



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: PG 19 release notes and authors
Next
From: "Jelte Fennema-Nio"
Date:
Subject: Re: pg_get__*_ddl consolidation