Re: INTERSECT AND ORDER BY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: INTERSECT AND ORDER BY
Дата
Msg-id 3084.992467873@sss.pgh.pa.us
обсуждение исходный текст
Ответ на INTERSECT AND ORDER BY  (Gary DeSorbo <isasitis@uchicago.edu>)
Список pgsql-general
Gary DeSorbo <isasitis@uchicago.edu> writes:
> I am trying to use the query below:
> SELECT date_worked, hours_worked
> FROM hours
> WHERE date_worked < '8/15/2001'
> INTERSECT
> SELECT date_worked, hours_worked
> FROM hours
> WHERE date_worked > '8/8/2001'
> ORDER BY date_worked

> but Postgres does not seem to like the ORDER BY     clause.

Ignoring the fact that this is a tremendously inefficient way to do it
(cf. Bruno Wolff's response nearby), it should have worked.  At least
in 7.1, I don't see a problem.  Before 7.1 INTERSECT and EXCEPT had
some limitations ...

            regards, tom lane

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

Предыдущее
От: "Andy Samuel"
Дата:
Сообщение: Re: Vacuum-ing without disconnecting users
Следующее
От: Lamar Owen
Дата:
Сообщение: Re: Log files, how to rotate properly