Re: Problem with displaying "wide" tables in psql - Mailing list pgsql-hackers

From Sergey Muraviov
Subject Re: Problem with displaying "wide" tables in psql
Date
Msg-id CAJTaR33SkRLwE_sTVnL6HtDN05B8EgdN5n-hWSWM6=BO7Rxajw@mail.gmail.com
Whole thread Raw
In response to Re: Problem with displaying "wide" tables in psql  (Greg Stark <stark@mit.edu>)
Responses Re: Problem with displaying "wide" tables in psql  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
Hi.

How can I pass or set the value of pset variable for an regression test?

The code with ioctl was copied from print_aligned_text function, which has a long history.
43ee2282 (Bruce Momjian      2008-05-16 16:59:05 +0000  680)                    if (ioctl(fileno(stdout), TIOCGWINSZ, &screen_size) != -1)

2014-04-08 20:27 GMT+04:00 Greg Stark <stark@mit.edu>:
On Tue, Apr 8, 2014 at 12:19 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> I don't think this is easily testable that way - doesn't it rely on
> determining the width of the terminal? Which you won't have when started
> from pg_regress?

There's a pset variable to set the target width so at least the
formatting code can be tested. It would be nice to have the ioctl at
least get called on the regression farm so we're sure we aren't doing
something unportable.

--
greg



--
Best regards,
Sergey Muraviov

pgsql-hackers by date:

Previous
From: Rajeev rastogi
Date:
Subject: Re: Autonomous Transaction (WIP)
Next
From: Heikki Linnakangas
Date:
Subject: Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)