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

Re: Proposed patch - psql wraps at window width

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Bryce Nesbitt" <bryce2(at)obviously(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, "Brendan Jurd" <direvus(at)gmail(dot)com>, <heikki(at)enterprisedb(dot)com>
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-29 03:49:54
Message-ID: 87prs98gm5.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackers
"Bruce Momjian" <bruce(at)momjian(dot)us> writes:

> Gregory Stark wrote:
>> > Now, we could get fancy and honor $COLUMNS only in non-interactive mode,
>> > but that seems confusing.
>> 
>> We could always read COLUMNS early on before readline is initialized and stash
>> the value away in a variable. But...
>> 
>> We would only look at COLUMNS if the ioctl for window size failed. Does
>> psql/readline do anything to COLUMNS in that case?
>
> We do look at COLUMNS if the ioctl() fails, but not for file/pipe
> output.

Yeah, it looks like your most recent patch still has the bug that if the user
specifies wrapped there are some complicated rules creating cases where it
will ignore the user's request and use un-wrapped output instead.


-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!

In response to

Responses

pgsql-hackers by date

Next:From: Greg Sabino MullaneDate: 2008-04-29 04:00:33
Subject: Re: [COMMITTERS] pgsql: Increase the statement_timeout value used in the prepared_xacts
Previous:From: Bruce MomjianDate: 2008-04-29 03:11:50
Subject: Re: Proposed patch - psql wraps at window width

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