some psql table output flaws

Started by Peter Eisentrautabout 13 years ago2 messageshackers
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

I have encountered two unrelated flaws in the psql table output.

First, when using unaligned vertical mode (\a \x on), there is always an
empty line after the last record. This also means that an empty result
set prints an empty line, instead of nothing.

Second, when using aligned vertical mode (\x on), an empty result set
prints "(No rows)". That's fine, but there is no way to turn this off.
I intuitively attempted to use \t (tuples only), but that had no
effect. \t doesn't really have a meaning in vertical mode, because the
field names are always printed, but I think it could/should have the
effect of shutting off footer lines.

Patch for both issues attached.

Attachments:

pg-psql-fixes.patchtext/plain; charset=UTF-8; name=pg-psql-fixes.patch; x-mac-creator=0; x-mac-type=0Download+9-5
#2Erik Rijkers
er@xs4all.nl
In reply to: Peter Eisentraut (#1)
Re: some psql table output flaws

On Fri, February 1, 2013 21:22, Peter Eisentraut wrote:

I have encountered two unrelated flaws in the psql table output.

First, when using unaligned vertical mode (\a \x on), there is always an
empty line after the last record. This also means that an empty result
set prints an empty line, instead of nothing.

Second, when using aligned vertical mode (\x on), an empty result set
prints "(No rows)". That's fine, but there is no way to turn this off.
I intuitively attempted to use \t (tuples only), but that had no
effect. \t doesn't really have a meaning in vertical mode, because the
field names are always printed, but I think it could/should have the
effect of shutting off footer lines.

Patch for both issues attached.

+1

I'd be very glad not to have to 'grep -v' this stuff away all the time

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers