count(*) of zero rows returns 1 - Mailing list pgsql-hackers

From Gurjeet Singh
Subject count(*) of zero rows returns 1
Date
Msg-id CABwTF4WOpQi53+rSoHOrP1j0LpbQ7vtyF2mvOP__cZwmas4Scw@mail.gmail.com
Whole thread Raw
Responses Re: count(*) of zero rows returns 1
List pgsql-hackers
<div dir="ltr">Can somebody explain why a standalone count(*) returns 1?<br /><br />postgres=# select count(*);<br
/> count<br />-------<br />     1<br />(1 row)<br /><br />I agree it's an odd thing for someone to query, but I feel it
shouldreturn 0, and not 1.<br clear="all" /><br />-- <br /><div dir="ltr">Gurjeet Singh<br /><br /><a
href="http://gurjeet.singh.im/"target="_blank">http://gurjeet.singh.im/</a><br /></div></div> 

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: erroneous restore into pg_catalog schema
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4)