Fix for psql pager computations

Started by Bruce Momjianabout 18 years ago2 messagespatches
Jump to latest
#1Bruce Momjian
bruce@momjian.us

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@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

Attachments:

/pgpatches/psql_pagertext/x-diffDownload+181-126
#2Bruce Momjian
bruce@momjian.us
In reply to: Bruce Momjian (#1)
Re: Fix for psql pager computations

Bruce Momjian wrote:

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.

Update patch applied.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

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

Attachments:

/pgpatches/pagertext/x-diffDownload+180-121