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:13:06
Message-ID: CAEzk6fdowS0_6ntvrwEWu_KVKRL+qGiOdavvrbU18FeL0q_TmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11 June 2015 at 15:05, Marc Mamin <M(dot)Mamin(at)intershop(dot)de> wrote:

> That's the point. * has no meaning without FROM
>


But COUNT(*)
*​​does* have meaning - it means "the number of rows".
​ It's not counting the number of columns in the row, so postgres doesn't
need to know what columns exist in the row to return a row count.​

​Geoff​

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Mamin 2015-06-11 14:17:17 Re: select count(*);
Previous Message Marc Mamin 2015-06-11 14:05:11 Re: select count(*);