Re: \x auto and EXPLAIN

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \x auto and EXPLAIN
Date: 2016-03-11 13:05:28
Message-ID: CA+TgmoaEuFP7xvgi+vX=KdXcAfSO+txcCwtXNi7Hb0K_0mG2rA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 3, 2016 at 4:36 AM, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
> 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.
>
> I have attached a trivial patch for each solution.

Committed #1 after updating the comments and adding documentation.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stas Kelvich 2016-03-11 13:13:14 Re: Tsvector editing functions
Previous Message Haribabu Kommi 2016-03-11 12:50:09 Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission denied”