Re: [GENERAL] Count column with name 'count' returns multiple rows.Why? - Mailing list pgsql-general

From Justin Pryzby
Subject Re: [GENERAL] Count column with name 'count' returns multiple rows.Why?
Date
Msg-id 20170818113715.GC24376@telsasoft.com
Whole thread Raw
In response to [GENERAL] Count column with name 'count' returns multiple rows. Why?  (Rob Audenaerde <rob.audenaerde@gmail.com>)
Responses Re: [GENERAL] Count column with name 'count' returns multiple rows.Why?
List pgsql-general
On Fri, Aug 18, 2017 at 01:01:45PM +0200, Rob Audenaerde wrote:
> I don't understand why this query:
>
>    select count(base.*) from mytable base;
>
> does return multiple rows.
>
>    select count(1) from mytable base;
>
> returns the proper count.
>
> There is a column with the name 'count'.
>
> Can anyone please explain this behaviour?

https://www.postgresql.org/docs/9.6/static/sql-expressions.html#SQL-EXPRESSIONS-FUNCTION-CALLS
https://www.postgresql.org/docs/9.6/static/rowtypes.html#ROWTYPES-USAGE


pgsql-general by date:

Previous
From: Rob Audenaerde
Date:
Subject: [GENERAL] Count column with name 'count' returns multiple rows. Why?
Next
From: Igor Korot
Date:
Subject: [GENERAL] Results interpretation