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 ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings