Re: [NOVICE] encoding problems

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [NOVICE] encoding problems
Дата
Msg-id 200805071720.m47HK5U02702@momjian.us
обсуждение исходный текст
Ответ на Re: [NOVICE] encoding problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [NOVICE] encoding problems  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > I have implemented the following patch which outputs tab as a tab.  It
> > also assumes a tab has a width of 4, which is its average width:
>
> That pretty much completely sucks; it will undo all the hard work we've
> put into nice formatting of the output, because seven times out of eight
> this assumption is wrong.
>
> An actually acceptable solution would involve emitting the correct
> number of spaces depending on how much we've put out so far.

Even if we knew the column position at output time, when we are doing
aligned column width computations, we don't know the width of the
previous columns so we would have no way to know how far the tab would
extend in the current column.

The only other idea I have is to output four spaces rather than '\x09'
for a tab.

--
  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-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [NOVICE] encoding problems
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [NOVICE] encoding problems