pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Peter Eisentraut <peter_e@gmx.net>
To: Bruce Momjian <bruce@momjian.us>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output
Date: Fri, 26 Jun 2015 17:38:39 -0500
Message-ID: <558DD46F.5020801@BlueTreble.com> (raw)
In-Reply-To: <558C136E.8090802@gmx.net>
References: <E1YaZk0-0001I6-Qw@gemulon.postgresql.org>
	<558C136E.8090802@gmx.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 6/25/15 9:42 AM, Peter Eisentraut wrote:
> On 3/24/15 9:04 PM, Bruce Momjian wrote:
>> psql:  show proper row count in \x mode for zero-column output
>>
>> Also, fix pager enable selection for such cases, and other cleanups for
>> zero-column output.
>>
>> Report by Thom Brown
>>
>> Branch
>> ------
>> master
>>
>> Details
>> -------
>> http://git.postgresql.org/pg/commitdiff/376a0c4547fe98c45476647596ce9c9b394f8415
>
> This change added an extra blank line to the output of a zero-row result.
>
> Compare:
>
> [9.4]
> $ psql -X -d postgres -c 'select * from pg_class where false' -x
> (No rows)
> $
>
> [9.5]
> $ psql -X -d postgres -c 'select * from pg_class where false' -x
> (0 rows)
>
> $
>
>
> Was that intentional?

That's consistent with what > 0 rows does, so it seems the correct thing 
to do. Going from "(No rows)" to "(0 rows)" is going to break things 
anyway, so I don't see a backwards compatibility issue here.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com


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



view thread (4+ messages)  latest in thread

Message-ID: <558DD46F.5020801@BlueTreble.com>
Permalink:  ../558DD46F.5020801@BlueTreble.com/
Also on:    postgresql.org/message-id/558DD46F.5020801@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, peter_e@gmx.net, bruce@momjian.us, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output
  In-Reply-To: <558DD46F.5020801@BlueTreble.com>
  References: <E1YaZk0-0001I6-Qw@gemulon.postgresql.org> <558C136E.8090802@gmx.net> <558DD46F.5020801@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox