Re: TODO list comments

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TODO list comments
Дата
Msg-id 771.1124993019@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TODO list comments  (Oliver Elphick <olly@lfix.co.uk>)
Ответы Re: TODO list comments  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Oliver Elphick <olly@lfix.co.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


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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: TODO list comments
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: TODO questions