pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Bitmead <chris.bitmead@bigfoot.com>
To: pgsql-hackers@hub.org
Subject: Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance
Date: Fri, 11 Jun 1999 23:12:56 +1000
Message-ID: <37610B58.3CB43151@bigfoot.com> (raw)
References: <9727.929027182@sss.pgh.pa.us>


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 <chris.bitmead@bigfoot.com> 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



view thread (5+ messages)  latest in thread

Message-ID: <37610B58.3CB43151@bigfoot.com>
Permalink:  ../37610B58.3CB43151@bigfoot.com/
Also on:    postgresql.org/message-id/37610B58.3CB43151@bigfoot.com

 · 

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-hackers@postgresql.org
  Cc: chris.bitmead@bigfoot.com, pgsql-hackers@hub.org
  Subject: Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance
  In-Reply-To: <37610B58.3CB43151@bigfoot.com>
  References: <9727.929027182@sss.pgh.pa.us> <37610B58.3CB43151@bigfoot.com>

* 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