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

Re: Proposed patch - psql wraps at window width

From: Bryce Nesbitt <bryce2(at)obviously(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, 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-28 01:38:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>> I don't see that behavior here on Ubuntu 7.10:
>> 	$ COLUMNNS=120 ls -C |cat
>> 	archive       cd    initrd      lost+found  proc  srv  usr
>> 	basement.usr  dev   initrd.img  media       root  sys  var
>> 	bin           etc   laptop      mnt         rtmp  tmp  vmlinuz
>> 	boot          home  lib         opt         sbin  u    win
>> 	$ ls --version
>> 	ls (GNU coreutils) 5.97
> Well, it's *certainly* gonna ignore "COLUMNNS".
> 			regards, tom lane
I'm having trouble seeing the relevance, either way.  First many shells 
don't set $COLUMNS at all (readline does it for psql).  And most shells 
that set $COLUMNS don't export it.  So most people get different output 

 # ls -C
 # ls -C | cat

Unless they are in the habit of doing:

 # COLUMNS=$COLUMNS ls -C |cat

I think it's too weird to default pipes to whatever the terminal width 
happens to be.  So that leaves you with an explicit command to set the 
width for pipes.



In response to


pgsql-hackers by date

Next:From: Jeff MacDonaldDate: 2008-04-28 04:34:32
Subject: quirk using 'ltree' module: paths ending with a dot result in cryptic error message
Previous:From: Brendan JurdDate: 2008-04-27 20:20:47
Subject: Re: Invalid to_date patterns (was: [PATCHES] [GENERAL] ISO week dates)

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