Re: [SQL] Slashdot Query - Mailing list pgsql-sql

From Chris Bitmead
Subject Re: [SQL] Slashdot Query
Date
Msg-id 375A5480.B45FEEB3@bigfoot.com
Whole thread Raw
In response to Re: [SQL] Slashdot Query  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [SQL] Slashdot Query
List 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 by date:

Previous
From: "Zot O'Connor"
Date:
Subject: Stats on Postgres
Next
From: Herouth Maoz
Date:
Subject: Re: [SQL] OUTER JOINs in PostgreSQL