Re: Problem with displaying "wide" tables in psql

From: Sergey Muraviov <sergey(dot)k(dot)muraviov(at)gmail(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Emre Hasegeli <emre(at)hasegeli(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with displaying "wide" tables in psql
Date: 2014-04-09 06:32:07
Message-ID: CAJTaR33SkRLwE_sTVnL6HtDN05B8EgdN5n-hWSWM6=BO7Rxajw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)mit(dot)edu>:

> On Tue, Apr 8, 2014 at 12:19 PM, Andres Freund <andres(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-04-09 06:37:24 Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Previous Message Rajeev rastogi 2014-04-09 05:33:41 Re: Autonomous Transaction (WIP)