Re: Odd error when using UNION and COLLATE

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Odd error when using UNION and COLLATE
Дата
Msg-id CAM-w4HOXkL1CrSzYK60hhqCSHXuTzUSTEtctRthNoRDKYDBXpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Odd error when using UNION and COLLATE  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
Actually there's nothing about UNION here. It's true for any column alias:

::***> select 'a-c' AS x ORDER BY x COLLATE "C" ;
ERROR:  42703: column "x" does not exist
LINE 2: select 'a-c' AS x ORDER BY x COLLATE "C" ;                                  ^
LOCATION:  errorMissingColumn, parse_relation.c:2892
Time: 0.204 ms

Also you don't need WITH, just an old-fashioned inline view:

::***> select * from (select 'a-c'::text AS x) as subquery ORDER BY x
COLLATE "C" ;
┌─────┐
│  x  │
├─────┤
│ a-c │
└─────┘
(1 row)



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Odd error when using UNION and COLLATE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Odd error when using UNION and COLLATE