BUG #18542: Order by expression, that contains column from projection isn't working

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18542: Order by expression, that contains column from projection isn't working
Дата
Msg-id 18542-adf5273ccfea5558@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18542: Order by expression, that contains column from projection isn't working
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18542
Logged by:          Aleksandr Novozhilov
Email address:      ivningman@gmail.com
PostgreSQL version: 16.1
Operating system:   Windows
Description:

select z as y from
 (select 1 as z) x
order by y + 1
That query finishes with error: 
ERROR: column "y" does not exist
  Position: 48
But wrapping it with select works fine:
select * from (select z as y from
 (select 1 as z) x) c
order by y + 1


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