Re: [NOVICE] encoding problems

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Cliff Nieuwenhuis <cliff(at)nieusite(dot)com>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [NOVICE] encoding problems
Date: 2008-05-07 18:24:09
Message-ID: 200805071824.m47IO9D04017@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-novice pgsql-patches

Alvaro Herrera wrote:
> Bruce Momjian wrote:
> > Alvaro Herrera wrote:
>
> > > If you start counting every line from the start of the current column,
> > > it will align correctly regardless of the previous columns.
> >
> > At this stage you don't know the width of previous columns because you
> > don't know if a very wide value is coming in a later row, so there is no
> > way to output the width of the cell with a tab you are looking at now.
> >
> > Unless I am misunderstanding you.
>
> Surely psql computes the width of all cells before printing anything.

It does, but if you have a value that has a tab, how do you know what
tab stop you are on because you don't know the final width of the
previous columns at that time, so there is no way to know the width of
that cell.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-07 18:44:29 Re: [NOVICE] encoding problems
Previous Message Josh Berkus 2008-05-07 18:19:56 Re: [0/4] Proposal of SE-PostgreSQL patches

Browse pgsql-novice by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-07 18:44:29 Re: [NOVICE] encoding problems
Previous Message Alvaro Herrera 2008-05-07 18:15:14 Re: [NOVICE] encoding problems

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-05-07 18:44:29 Re: [NOVICE] encoding problems
Previous Message Josh Berkus 2008-05-07 18:19:56 Re: [0/4] Proposal of SE-PostgreSQL patches