From: | "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com> |
---|---|
To: | Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com> |
Cc: | pgsql-sql(at)hub(dot)org |
Subject: | RE: [SQL] Slashdot Query |
Date: | 1999-06-07 21:29:32 |
Message-ID: | D05EF808F2DFD211AE4A00105AA1B5D21F24C6@cpsmail |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(dot)bitmead(at)bigfoot(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson, DeJuan | 1999-06-07 21:37:50 | RE: [SQL] Mail about duplicate rows |
Previous Message | Michael J Davis | 1999-06-07 20:10:26 | RE: [SQL] Getting primary key from insert statement |