Received: from tech.com.au (IDENT:root@techpt.lnk.telstra.net [139.130.75.122]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA04299 for ; Sun, 6 Jun 1999 06:59:19 -0400 (EDT) (envelope-from chris.bitmead@bigfoot.com) Received: from bigfoot.com (chris@localhost [127.0.0.1]) by tech.com.au (8.8.7/8.8.7) with ESMTP id UAA13798 for ; Sun, 6 Jun 1999 20:59:14 +1000 Sender: chris@tech.com.au Message-ID: <375A5480.B45FEEB3@bigfoot.com> Date: Sun, 06 Jun 1999 20:59:12 +1000 From: Chris Bitmead X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.9 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@hub.org Subject: Re: [SQL] Slashdot Query References: <16847.928506113@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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