Fix for psql pager computations

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Fix for psql pager computations
Date: 2008-05-14 20:57:12
Message-ID: 200805142057.m4EKvCV24327@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

The attached patch causes psql to use the pager if newlines or
'format=wrapped' has caused a single row to span more than one line and
the output is then too long for the screen. It also uses the pager if
psql thinks the data will wrap off the edge of the screen.

The display width as defined by \pset columns, $COLUMNS, or the ioctl
(as previously discussed) We don't have similar settings for the number
of display rows. I assume that is OK.

I believe this makes the pager more reliable, and in fact I have removed
the psql manual mention that pager computations are somewhat imperfect.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/pgpatches/psql_pager text/x-diff 12.4 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-05-14 23:28:01 Re: Patch to change psql default banner v6
Previous Message Merlin Moncure 2008-05-14 20:30:35 Re: libpq object hooks