Re: pgsql: psql: Improve expanded print output in tuples-only mode

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgsql: psql: Improve expanded print output in tuples-only mode
Date: 2013-02-09 08:20:35
Message-ID: 9c42f6485613d74886f0b09147b62dfe.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Sat, February 9, 2013 06:24, Peter Eisentraut wrote:
> psql: Improve expanded print output in tuples-only mode
>
> When there are zero result rows, in expanded mode, "(No rows)" is
> printed. So far, there was no way to turn this off. Now, when
> tuples-only mode is turned on, nothing is printed in this case.
>

Good, that's definitely an improvement.

But can we not remove that empty line alltogether in tuples-only mode?

At the moment:

$ echo '\dt+ diffs*' | psql --tuples-only
public | diffs_2013_01 | table | aardvark | 8456 kB |
public | diffs_2013_02 | table | aardvark | 7832 kB |

$

The trailing empty line here makes almost as little sense as in the now amended case where there
are zero rows ...

(Of course, I realise that it's much more likely to break existing scripts, but should we then
keep such illogical things forever at all cost?)

Thanks,

Erik Rijkers

> Branch
> ------
> master
>
> Details
> -------
> http://git.postgresql.org/pg/commitdiff/8ade58a4ea318d0ab8548ab94e49a3b80fdbeb0d
>
> Modified Files
> --------------
> src/bin/psql/print.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-02-09 16:43:54 pgsql: Add an example of attaching a default value to an updatable view
Previous Message Peter Eisentraut 2013-02-09 05:24:00 pgsql: psql: Improve expanded print output in tuples-only mode

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2013-02-09 08:52:00 performance regression in 9.2 CTE with SRF function
Previous Message Daniel Farina 2013-02-09 06:55:40 Re: Considering Gerrit for CFs