Re: TODO list comments

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO list comments
Date: 2005-08-25 17:21:25
Message-ID: 1124990485.6810.33.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2005-08-25 at 13:53 +0000, Greg Sabino Mullane wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Tom Lane asked:
>
> >> o Improve psql's handling of multi-line queries
>
> > Uh, what's wrong with it? This item seems far too vague.

If you enter a multi-line query one line at a time, a subsequent
up-arrow will recover one line at a time; on the other hand, if you use
\e to edit a multi-line query, a subsequent up-arrow will recover the
whole query in one go. The latter behaviour would be nice in all cases.

An item not in the TODO list yet -- would anyone support including this
feature in psql?:
It would be nice if multi-line items lined up with their proper column
on output. This is what happens at the moment:

junk=# insert into xyz (name,address) values ('Joe Bloggs','1 Hindhead Villas,
junk'# Newport,
junk'# Gwent');
INSERT 230412518 1
junk=# select * from xyz;
id | name | address
----+------------+-----------------------------------
1 | Joe Bloggs | 1 Hindhead Villas,
Newport,
Gwent
(1 row)

If there is more than one potential source column, things are even
worse:

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

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)

\a would turn this behaviour off.

Oliver Elphick

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-08-25 17:52:13 Re: [HACKERS] Proposed patch to getaddrinfo.c to support
Previous Message Tom Lane 2005-08-25 15:38:55 Re: API like mysql_ping