Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [206.210.65.6]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA58107 for ; Fri, 11 Jun 1999 10:03:33 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id KAA12146; Fri, 11 Jun 1999 10:02:56 -0400 (EDT) To: Chris Bitmead cc: pgsql-hackers@hub.org Subject: Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance In-reply-to: Your message of Fri, 11 Jun 1999 23:12:56 +1000 <37610B58.3CB43151@bigfoot.com> Date: Fri, 11 Jun 1999 10:02:56 -0400 Message-ID: <12144.929109776@sss.pgh.pa.us> From: Tom Lane Chris Bitmead writes: > 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 Would it be possible to have some CREATE TABLE statements for these tables, so that the problem can be reproduced without so much reverse-engineering? BTW, I do not know when "yesterday" your time might have been, but I committed a critical fix for UNION + GROUP BY in backend/optimizer/prep/prepunion.c at 10 Jun 02:55 EDT (-0400). If you don't have that version please update and try again. regards, tom lane