pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jackson, DeJuan <djackson@cpsgroup.com>
To: Chris Bitmead <chris.bitmead@bigfoot.com>
Cc: pgsql-sql@hub.org
Subject: RE: [SQL] Slashdot Query
Date: Mon, 7 Jun 1999 16:29:32 -0500
Message-ID: <D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail> (raw)

	Is it me or does this query actually make any sense???
	Is story.datetime a column in your table?

	You might be able to rewrite this query.  I don't know if the
ordering you were trying for is needed, but

		SELECT oid, title, image FROM category* 
		WHERE EXISTS(SELECT 1 FROM story 
	                WHERE story.approved AND story.category =
category.oid);

	should give you the same information.

	Hope this helps,
		-DEJ


> Chris Bitmead <chris.bitmead@bigfoot.com> writes:
> > 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.
> 
> This is a known problem --- see my pghackers email of a few days ago,
> "inherited GROUP BY is busted".
> 
> 			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail>
Permalink:  ../D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail/
Also on:    postgresql.org/message-id/D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: djackson@cpsgroup.com, chris.bitmead@bigfoot.com, pgsql-sql@hub.org
  Subject: Re: [SQL] Slashdot Query
  In-Reply-To: <D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail>
  References: <D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox