BUG #17232: DISTINCT ON does not allow AS

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17232: DISTINCT ON does not allow AS
Дата
Msg-id 17232-f7e20e9639b6a6c9@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #17232: DISTINCT ON does not allow AS  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: BUG #17232: DISTINCT ON does not allow AS  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-bugs
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

```
postgres=#
postgres=# SELECT version();
                          version
------------------------------------------------------------
 PostgreSQL 14.0, compiled by Visual C++ build 1914, 64-bit
(1 row)


postgres=# SELECT DISTINCT ON (col) AS col, col2 FROM test;
ERROR:  syntax error at or near "AS"
LINE 1: SELECT DISTINCT ON (col) AS col, col2 FROM test;
```


В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17231: ERROR: tuple concurrently updated
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #17232: DISTINCT ON does not allow AS