Re: \x auto and EXPLAIN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: \x auto and EXPLAIN
Date
Msg-id 26519.1451843019@sss.pgh.pa.us
Whole thread Raw
In response to \x auto and EXPLAIN  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: \x auto and EXPLAIN  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Re: \x auto and EXPLAIN  (Andreas Karlsson <andreas@proxel.se>)
List pgsql-hackers
Andreas Karlsson <andreas@proxel.se> writes:
> psql's "\x auto" is a nice feature, but it is made much less useful in 
> my opinion due to the expanded output format making query plans 
> unreadable (and query plans often end up using expanded display due to 
> their width). I think we should never use the expanded format for 
> EXPLAIN output in the "\x auto" mode, since even when the wrapped format 
> is used the query plans are very hard to read.

> I see two ways to fix this.

> 1) Never use expanded display for the case where there is only one 
> column. There seems to me like there is little value in using expanded 
> display for when you only have one column, but I may be missing some use 
> case here.

> 2) Explicitly detect (for example based on the headers) that the result 
> is a query plan and if so disable expanded display.

The second of these seems pretty bletcherous --- for one thing, it might
fall foul of localization attempts.  However, I could see the argument
for not using expanded mode for any single-column output.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: dynloader.h missing in prebuilt package for Windows?
Next
From: Andres Freund
Date:
Subject: Re: Some 9.5beta2 backend processes not terminating properly?