[BUGS] seems column(alias_name) is a valid syntax? I cant find anythingalike in docs
[BUGS] seems column(alias_name) is a valid syntax? I cant find anythingalike in docs
От:
Vladimir Svedov <vodevsh@gmail.com>
Дата:
Hi,
Sorry If bother you again for no reason. Was surprised by behaviour described in
Quite soon found out that column_name(alias_name) seems a valid syntax, below a(c) works - is it a feature? I could not find it anywhere in docs.
s=# with c(a,b) as (values(1,2),(2,3))
select a(c),(c).a from c;a | a
---+---1 | 12 | 2
(2 rows)Why would I use such syntax in first place? as described in SO original post, he has a column named "count" and thus select count(table_name.*) from table_name
returns column "count" instead of number of rows. I can't tell why would you name column with function name.
So please help finding the docs and understanding why it works.
Thank you