Re: Proposed patch - psql wraps at window width

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Proposed patch - psql wraps at window width
Дата
Msg-id 87abjj6m8n.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Re: Proposed patch - psql wraps at window width  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Proposed patch - psql wraps at window width  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
"Bruce Momjian" <bruce@momjian.us> writes:

> I think the API in the patch is the best I am going to do to keep
> everyone happy --- 'wrapped' doesn't affect file/pipe output unless you
> also tell it the width you want.  Most interactive users are going to
> set 'wrapped' and never set the width so it is automatically determined.

Aaah, I think that's the key to where we're going wrong.

Trying to use the columns logic to encode two separate decisions. "wrapped or
not wrapped" and "how wide".

I think this also clarifies Tom's objection. He's worried about people
configuring psql for interactive use and being surprised when their automated
scripts fail to parse the resulting output.

We do need a way to specifically request wrapped format, but if we want a way
to say "wrapped format only on a terminal" then we should have a mode for that
too.

But once we're in wrapped format we should stick to it and always follow the
same logic to determine the width.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication
support!


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

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