Re: select count(*);

From: Geoff Winkless <pgsqladmin(at)geoff(dot)dj>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: select count(*);
Date: 2015-06-11 14:39:59
Message-ID: CAEzk6fdp-F+PQoe7RmWrsAPj67jKLgixpEQ6NM_Ap_DDLWUd3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11 June 2015 at 15:35, Yves Dorfsman <yves(at)zioup(dot)com> wrote:

> On 2015-06-11 08:20, Geoff Winkless wrote:
> > On 11 June 2015 at 15:17, Marc Mamin <M(dot)Mamin(at)intershop(dot)de
> > <mailto:M(dot)Mamin(at)intershop(dot)de>>wrote:
> >
> > >But COUNT(*)
> > >
> > >does have meaning - it means "the number of rows".
> >
> > which rows? :-)
> >
> >
> > ​The number of rows in the query, as well you know :)
>
> But interestingly
>
> postgres=# select count(*) where 1=0;
> count
> -------
> 0
> (1 row)
>
>
> ​As expected.

=#

SELECT
1 WHERE 1=0;
?column?
----------
(0 rows)

​Geoff​

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2015-06-11 14:41:59 Re: select count(*);
Previous Message Yves Dorfsman 2015-06-11 14:35:11 Re: select count(*);