Re: two-argument aggregates and SQL 2003 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: two-argument aggregates and SQL 2003
Date
Msg-id 28290.1145128943@sss.pgh.pa.us
Whole thread Raw
In response to Re: two-argument aggregates and SQL 2003  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Sat, Apr 15, 2006 at 12:51:24AM -0400, Tom Lane wrote:
>> I had an epiphany that might serve as illustration of the above.  We
>> have traditionally thought of COUNT(*) as an "aggregate over any base
>> type".  But wouldn't it be cleaner to think of it as an aggregate over
>> zero inputs?

> Speaking strictly from a users PoV, I'm not sure this is a great idea,
> since it encourages non-standard code (AFAIK no one else accepts
> 'count()'), and getting rid of support for count(*) seems like a
> non-starter, so I'm not sure there's any benefit.

Well, if you want, we can still insist that actual invocations of a
zero-argument aggregate be spelled with (*).  But from a conceptual and
documentation standpoint we should think of them as zero-argument,
not sort-of-one-argument.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: two-argument aggregates and SQL 2003
Next
From: "Dave Page"
Date:
Subject: Re: Google SoC--Idea Request