Re: Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output
Дата
Msg-id 558DD46F.5020801@BlueTreble.com
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-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



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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: UPSERT on partition
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: 9.5 release notes