Re: Proposed patch - psql wraps at window width

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Proposed patch - psql wraps at window width
Дата
Msg-id 200804242032.m3OKWHd21443@momjian.us
обсуждение исходный текст
Ответ на Re: Proposed patch - psql wraps at window width  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Proposed patch - psql wraps at window width  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Peter Eisentraut wrote:
> Bruce Momjian wrote:
> > Greg's suggestion is to use $COLUMNS if the width can't be determined
> > because the output is not directly to the screen. ?$COLUMNS is updated
> > by many shells.
> 
> I think it is best not to look at $COLUMNS at all.  If the output is to a 
> terminal, then use ioctl to query the terminal.  And provide a \pset command 
> to set a width explicitly, which can apply in all cases.

Yes, that is pretty much what we have now, except we try for $COLUMNS if
ioctl() fails for interactive use.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Proposed patch - psql wraps at window width
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposed patch - psql wraps at window width