Re: max(*)

Поиск
Список
Период
Сортировка
Искать
От
Simon Riggs
Тема
Re: max(*)
Дата
в 07:09:57
Msg-id
1148638188.7524.161.camel@localhost.localdomain
Ответ на
max(*) (Dennis Bjorklund)
Список
Дерево обсуждения
max(*) Dennis Bjorklund <db@zigo.dhs.org>
Re: max(*) Simon Riggs <simon@2ndquadrant.com>
Re: max(*) Tom Lane <tgl@sss.pgh.pa.us>
Re: max(*) "Jim C. Nasby" <jnasby@pervasive.com>
Re: max(*) Bruno Wolff III <bruno@wolff.to>
Re: max(*) Tom Lane <tgl@sss.pgh.pa.us>
Re: max(*) "Gurjeet Singh" <singh.gurjeet@gmail.com>
Re: max(*) Robert Treat <xzilla@users.sourceforge.net>
On Fri, 2006-05-26 at 10:22 +0200, Dennis Bjorklund wrote:
> Shouldn't
> 
>    SELECT max(*) FROM foo;
> 
> give an error? 

SQL:2003 would not allow this; SQL:2003 permits only COUNT(*) and no
other aggregate function. All other aggregates require a value
expression.

> Instead it's executed like
> 
>    SELECT max(1) FROM foo;
> 
> Just like count(*) is executed as count(1).
> 
> Something for the TODO or is it a feature?

Doesn't seem an important or even useful extension of the standard, but
would probably require special case processing for every aggregate
function in order to implement that. Its not dangerous... so I'm not
sure we should take any action at all.

--  Simon Riggs              EnterpriseDB   http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления
От: Simon Riggs
Дата:
Сообщение: Re: XLogArchivingActive
От: Andreas Pflug
Дата:
Сообщение: Re: XLogArchivingActive
FAQ