select a.name ... union select a.name ... order by a.name fails in 7.1

Поиск
Список
Период
Сортировка
От Palle Girgensohn
Тема select a.name ... union select a.name ... order by a.name fails in 7.1
Дата
Msg-id 3AE355A0.F5FD48E@partitur.se
обсуждение исходный текст
Список pgsql-bugs
Hi!

I'm not certain this is correct SQL, and I know the rewrite is
easy, but here is a difference I found between 7.0.3 and 7.1:

select a.name from users a
union
select a.name from oldusers a
order by a.userid;

ERROR:  Relation 'a' does not exist

This works fine in postgres 7.0.x

the simple rewrite is of course 'order by userid', but it is
tedious to find all places in our system where this happens. It
seems some programmers have used the above syntax a lot :(

Is it a bug, or was it a feature in 7.0?

/Palle
--
         Partitur Informationsteknik AB
Wenner-Gren Center             +46 8 566 280 02
113 46 Stockholm           +46 70 785 86 02
Sweden                   girgen@partitur.se

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: jdbc2 fails to getDate
Следующее
От: Palle Girgensohn
Дата:
Сообщение: Re: select a.name ... union select a.name ... order by a.name fails in 7.1