Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
Дата
Msg-id 12470.939162585@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
Список pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
> But can we compare aggs and non-aggs?  I see now that our code is fine:

No, you're barking up the wrong tree.  The issue is whether a HAVING
clause that doesn't contain *any* aggregates is legal/reasonable.
It can contain non-aggregated references to GROUP BY columns in
any case.  But without aggregates, there's no semantic difference
from putting the same condition in WHERE.

I believe that planner.c currently has an implementation assumption
that HAVING must have an aggregate (because it hangs the HAVING clause
onto the Agg plan node as a qual clause --- if no Agg node, no place to
perform the HAVING test).  This could be fixed if we felt it was worth
doing.

I can't get excited about changing this from the standpoint of
functionality, because AFAICS there is no added functionality.
But if we're looking bad on a recognized benchmark maybe we
should do something about it.
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison