Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison |
Дата | |
Msg-id | 199910051550.LAA13312@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] Re: [GENERAL] Re: [PHP3] Re: PostgreSQL vs Mysql comparison
|
Список | pgsql-hackers |
> That's not a bug, it means what it says: HAVING clauses should contain > aggregate functions. Otherwise they might as well be WHERE clauses. > (In this example, flushing rows with negative a before the group step, > rather than after, is obviously a win, not least because it would > allow the use of an index on a.) > > However, I can't see anything in the SQL92 spec that requires you to > use HAVING intelligently, so maybe this error should be downgraded to > a notice? "HAVING with no aggregates would be faster as a WHERE" > (but we'll do it anyway to satisfy pedants...) If we allow them, then people can do things like: HAVING max(a) > b which seems strange. Would we handle that? -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-hackers по дате отправления: