Re: TODO list comments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: olly(at)lfix(dot)co(dot)uk
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO list comments
Date: 2005-08-25 18:03:39
Message-ID: 771.1124993019@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> It would be better to show the columns aligned (perhaps without showing
> separators for other columns so as not to give the impression that the
> other columns contain null or empty strings):

> junk=# select * from xyz;
> id | name | address | del_addr
> ----+------------+-----------------------------------+----------------------------------
> 1 | Joe Bloggs | 1 Hindhead Villas, | 2 The Laurels,
> | Newport, | Swinkley,
> | Gwent | XX3 5CX
> (1 row)

I think the above is unacceptable because it looks indistinguishable
from a valid but quite different dataset. (No, the "1 row" doesn't make
it better; as soon as there's more than one row you can't tell what you
have. And leaving out the first | doesn't help if all the columns are
multiline.)

It might be OK without any separators on the added lines, though:

id | name | address | del_addr
----+------------+-----------------------------------+----------------------------------
1 | Joe Bloggs | 1 Hindhead Villas, | 2 The Laurels,
Newport, Swinkley,
Gwent XX3 5CX
(1 row)

Or perhaps use a different separator:

junk=# select * from xyz;
id | name | address | del_addr
----+------------+-----------------------------------+----------------------------------
1 | Joe Bloggs | 1 Hindhead Villas, | 2 The Laurels,
+ + Newport, + Swinkley,
+ + Gwent + XX3 5CX
(1 row)

Not sure how hard this would be to program, or what sort of overhead it
might impose to check for the case. My recollection is that psql's
table-layout code is pretty slow and ugly already ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-08-25 18:16:36 Re: TODO questions
Previous Message Tom Lane 2005-08-25 17:52:13 Re: [HACKERS] Proposed patch to getaddrinfo.c to support