Re: wrapping in extended mode doesn't work well with default pager

From: Noah Misch <noah(at)leadboat(dot)com>
To: Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Emre Hasegeli <emre(at)hasegeli(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: wrapping in extended mode doesn't work well with default pager
Date: 2014-06-09 03:29:36
Message-ID: 20140609032936.GA594067@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 23, 2014 at 10:10:23AM -0400, Alvaro Herrera wrote:
> Sergey Muraviov wrote:
> > I found some new bugs and fix them.
> > And I had to make many changes.
>
> This version fixes some bugs I had noticed in expanded mode too. For instance,
> the original looked like this (five lines plus header):
>
> -[ RECORD 49 ]-----+-------------------------------------------------------------------------
> pg_identify_object | (rule,,,"""_RETURN"" on pg_catalog.pg_available_extension_versions")
>
> pg_identify_object | (view,pg_catalog,pg_available_extension_versions,pg_catalog.pg_availabl
> e.
> |._extension_versions)
>
>
> whereas it's correctly only three lines plus header with this patch
> applied.

I had noticed a similar-looking behavior change with aligned format and
expanded display, so I gave psql-wrapped-expanded-fix-v4.patch a spin with
this test case:

\pset expanded on
\pset format aligned
select repeat('a', 2) union all select repeat('a', 500);

The patch did not restore 9.3 behavior for that one. Starting with commit
6513633, the first line of letters is space-padded on the right to the width
of the second line of letters. To illustrate, I have attached raw psql output
from both commit 6513633 and its predecessor. Also note that
psql-wrapped-expanded-fix-v4.patch expands each [ RECORD x ] header from 509
bytes to 511 bytes; 509 is the longstanding width.

Thanks,
nm

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

Attachment Content-Type Size
out-6513633 text/plain 2.1 KB
out-6513633~1 text/plain 1.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-06-09 04:03:11 Re: Scaling shared buffer eviction
Previous Message johnlumby 2014-06-09 02:12:08 Re: Extended Prefetching using Asynchronous IO - proposal and patch