On Friday, October 15, 2021, PG Bug reporting form <
noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 17232
Logged by: Kyle Lahnakoski
Email address: kyle@lahnakoski.com
PostgreSQL version: 14.0
Operating system: windows
Description:
The following SQL has an unexpected syntax error
SELECT DISTINCT ON (col) AS col, col2 FROM test
The AS clause is usually used to indicate alias, but it does not work in
this case
No it doesn’t. Why do you think it should? The columns in the ON parens are not output so they don’t ned aliases.
David J.