Re: Fixes a trivial bug in dumped parse/query/plan trees
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Chao Li <li.evan.chao@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-02T16:08:27Z
Lists: pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes: >> On 25 Aug 2025, at 02:54, Chao Li <li.evan.chao@gmail.com> wrote: >> This patch fixes a trivial bug where an extra whitespace was added >> when dumping an array, for example: >> ... >> The unnecessary whitespace is now removed. > What about external parsers written for this format which might now break? > (Judging by the commitlog I believe this format is intentional and not a bug.) Yeah, I'm inclined to reject this patch. This is by no stretch of the imagination a "bug"; a more accurate characterization is that it's a minor optimization that the original author did not think was worth troubling with. While our existing nodeRead code wouldn't have a problem with removing the extra whitespace, I share your fear that we could introduce bugs into some third-party code somewhere. So the cost/benefit ratio of making the change doesn't look very good to me. I do have interest in trying to aggressively reduce the stored size of view/rule parsetrees, and would be willing to break such hypothetical third-party code in pursuit of a sufficiently large improvement (say, 2X or better). But a change like this one, in isolation, isn't going to move that needle. regards, tom lane