Received: from tech.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 JAA51683 for ; Fri, 11 Jun 1999 09:13:11 -0400 (EDT) (envelope-from chris.bitmead@bigfoot.com) Received: from bigfoot.com (IDENT:chris@localhost [127.0.0.1]) by tech.tech.com.au (8.9.3/8.9.3) with ESMTP id XAA17006 for ; Fri, 11 Jun 1999 23:13:00 +1000 Sender: chris@tech.tech.com.au Message-ID: <37610B58.3CB43151@bigfoot.com> Date: Fri, 11 Jun 1999 23:12:56 +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-hackers@hub.org Subject: Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance References: <9727.929027182@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Ok, I upgraded my CVS sources yesterday, and simple inherited/GROUP BY queries are working again. But a more complex one still seems broken. This is the query... httpd=> SELECT question.oid, question.title, question.summary, question.datetime, category.oid, category.title, category.image, email, webuser.name, count(comment.oid) FROM question, webuser, category*,comment WHERE question.webuser = webuser.oid and question.category = category.oid AND comment.webobject = question.oid GROUP BY question.oid, question.title, question.summary, question.datetime, category.oid, category.title, category.image, email, webuser.name UNION SELECT question.oid, question.title, question.summary, question.datetime, category.oid, category.title, category.image, webuser.email, webuser.name, 0 FROM question, webuser, category* WHERE question.webuser = webuser.oid and question.category = category.oid; ERROR: replace_vars_with_subplan_refs: variable not in target list Tom Lane wrote: > > Chris Bitmead writes: > > This is from CVS of about a week ago. > > > SELECT question.title, count(comment.oid) FROM question, > > category*,comment WHERE comment.webobject = question.oid and > > question.category = category.oid GROUP BY question.title; > > See my message from Sunday, "inherited GROUP BY is busted": > > : It turns out that pretty much *anything* involving grouping or > : aggregation would fail if the query used inheritance, because the > > This query seems to work with current sources (although EXPLAIN > fails for it --- I think that explain.c is out of sync with the > executor). > > regards, tom lane -- Chris Bitmead mailto:chris@tech.com.au http://www.techphoto.org - Photography News, Stuff that Matters