Skip site navigation (1) Skip section navigation (2)

Re: Proposed patch - psql wraps at window width

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Bryce Nesbitt <bryce2(at)obviously(dot)com>, heikki(at)enterprisedb(dot)com
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-17 13:09:23
Message-ID: 200804171509.25472.peter_e@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Bruce Momjian wrote:
> I checked the use of COLUMNS and it seems bash updates the environment
> variable when a window is resized.  I added ioctl(TIOCGWINSZ) if COLUMNS
> isn't set.  We already had a call in print.c for detecting the
> number of rows on the screen to determine if the pager should
> be used.  Seems COLUMNS should take precedence over ioctl(), right?

Considering that the code to determine the row count is undisputed so far, the 
column count detection should work the same.  That is, we might not need to 
look at COLUMNS at all.  Unless there is a use case for overriding the column 
count (instead of just turning off the wrapping).

In response to

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2008-04-17 13:14:13
Subject: Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory
Previous:From: Alvaro HerreraDate: 2008-04-17 13:05:43
Subject: Re: Re: [COMMITTERS] pgsql: Repair two places whereSIGTERM exit couldleave shared memory

pgsql-patches by date

Next:From: Peter EisentrautDate: 2008-04-17 13:18:54
Subject: Re: Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Previous:From: Alvaro HerreraDate: 2008-04-17 12:34:52
Subject: Re: Proposed patch - psql wraps at window width

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group