Re: psql expanded auto

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: psql expanded auto
Дата
Msg-id 1320727012.31945.2.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Re: psql expanded auto  (Noah Misch <noah@leadboat.com>)
Ответы Re: psql expanded auto  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On lör, 2011-11-05 at 12:26 -0400, Noah Misch wrote:
> On Sat, Nov 05, 2011 at 04:53:56PM +0200, Peter Eisentraut wrote:
> > On fre, 2011-11-04 at 07:34 -0400, Noah Misch wrote:
> > > For "\pset format wrapped", we only use $COLUMNS when the output is a
> > > tty.  I'm thinking it's best, although not terribly important, to
> > > apply the same rule to this feature.
> >
> > I think it does work that way.  There is only one place where the
> > environment variable is queries, and it's used for both wrapped format
> > and expanded auto format.
>
> You're correct; given output to a non-tty and no use of \pset columns,
> output_columns always becomes zero.  This makes wrapped format never wrap, but
> it makes expanded auto mode always expand.  Would it be more consistent to never
> expand when output_columns == 0?  That is, make these give the same output:
>
> psql -X -P expanded=auto -c "select 'a' as a"
> psql -X -P expanded=auto -c "select 'a' as a" | cat
>
> I just noticed: the help text for \x in slashUsage() will also need an update.

Here is an updated patch that addresses all the issues you pointed out.


Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: proposal: psql concise mode
Следующее
От: Robert Haas
Дата:
Сообщение: ProcArrayLock contention