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. +