From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: max(*) |
Date: | 2006-05-26 10:09:48 |
Message-ID: | 1148638188.7524.161.camel@localhost.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2006-05-26 10:15:08 | Re: XLogArchivingActive |
Previous Message | Simon Riggs | 2006-05-26 09:59:37 | Re: XLogArchivingActive |