Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance

Поиск
Список
Период
Сортировка
От Chris Bitmead
Тема Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance
Дата
Msg-id 37610B58.3CB43151@bigfoot.com
обсуждение исходный текст
Ответ на Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Karl DeBisschop
Дата:
Сообщение: Re: [GENERAL] Re: [HACKERS] postgres processes
Следующее
От: Dmitry Samersoff
Дата:
Сообщение: Client