Re: ExplainProperty* and units - Mailing list pgsql-hackers

From David Rowley
Subject Re: ExplainProperty* and units
Date
Msg-id CAKJS1f_kUYaj2HKuKSN0t-htaT4BdQcJ_sHx6ruoCELLfC=RBA@mail.gmail.com
Whole thread Raw
In response to Re: ExplainProperty* and units  (Andres Freund <andres@anarazel.de>)
List 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


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: remove pg_class.relhaspkey
Next
From: Thomas Munro
Date:
Subject: Re: Instability in parallel regression tests