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 [email protected]
Whole thread Raw
In response to [GENERAL] Count column with name 'count' returns multiple rows. Why?  (Rob Audenaerde <[email protected]>)
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