Re: [SQL] Slashdot Query

Поиск
Список
Период
Сортировка
От Chris Bitmead
Тема Re: [SQL] Slashdot Query
Дата
Msg-id 375A5480.B45FEEB3@bigfoot.com
обсуждение исходный текст
Ответ на Re: [SQL] Slashdot Query  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [SQL] Slashdot Query
Список pgsql-sql
Tom Lane wrote:
> You might consider using GROUP BY rather than DISTINCT if you want
> to order the results in a particular way, say
>         SELECT oid, title, image ...
>                 GROUP BY oid, title, image ORDER BY min(datetime)

I tried the following query and it crashed the backend. (CVS of a couple
of days ago).

SELECT category.oid, category.title, category.image FROM story,
category* WHERE story.category = category.oid AND story.approved GROUP
BY category.oid, category.title, category.image ORDER BY min(datetime);
pqReadData() -- backend closed the channel unexpectedly.       This probably means the backend terminated abnormally
  before or while processing the request.
 
We have lost the connection to the backend, so further processing is
impossible.  Terminating.


-- 
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris.bitmead@bigfoot.com


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

Предыдущее
От: "Zot O'Connor"
Дата:
Сообщение: Stats on Postgres
Следующее
От: Herouth Maoz
Дата:
Сообщение: Re: [SQL] OUTER JOINs in PostgreSQL