Re: ExplainProperty* and units
David Rowley <david.rowley@2ndquadrant.com>
From: David Rowley <david.rowley@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2018-03-15T01:52:32Z
Lists: pgsql-hackers
On 15 March 2018 at 05:07, Andres Freund <andres@anarazel.de> wrote: > On 2018-03-14 14:34:38 +1300, David Rowley wrote: >> It would be nice to see us completely get rid of all the >> appendStringInfo* calls, apart from in the functions which meant to >> handle the behaviour specific to the explain format. This is a step >> towards that, so has my vote. > > Do you mean you want to only use ExplainProperty*? Given the desire of > density for plan output that seem hard to achieve. You're probably right, there are many cases where we want some specific compact format for text, but care less about the verbosity in JSON/XML. Probably there is room to improve this a little by having something like ExplainPropertyFormat. But not for today... I only mentioned it as I saw your patch as a step in the right direction. >> Functions like show_hash_info are making it difficult to do more in this area. > > Hm, what's the problem? Basically the special cases for TEXT types plus manually building strings with appendStringInfo and manually dealing with indentation. An ExplainPropertyFormat could help some of that, but wouldn't get rid of the special TEXT case. -- David Rowley http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Add 'unit' parameter to ExplainProperty{Integer,Float}.
- 7a50bb690b48 11.0 landed
-
Make ExplainPropertyInteger accept 64bit input, remove *Long variant.
- f3e4b95edb6c 11.0 landed