Re: \d+ for long view definitions?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: \d+ for long view definitions?
Date: 2009-08-31 00:04:39
Message-ID: 20090831000439.GB18965@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Using \d on, say, information schema views is completely hilarious
> > because the column name/data type information is usually scrolled off
> > the screen by the immense view definition.
>
> > Could we change this perhaps so that the full view definition is only
> > shown with \d+ when the view definition is longer than N characters or N
> > lines or some other suitable cutoff. Ideas?
>
> The same complaint could be made for any table with more than
> twenty-some columns. Seems like a more general answer would be
> for \d output to go through the pager ...

I think the fix is to have psql add the number of lines in headers and
footers to the calculation that decides whether to use the pager or not.
Right now I think it only considers data rows.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-08-31 00:22:51 Re: 8.5 release timetable, again
Previous Message Tom Lane 2009-08-30 22:43:51 Re: \d+ for long view definitions?