Re: two-argument aggregates and SQL 2003

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: "Sergey E(dot) Koposov" <math(at)sai(dot)msu(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: two-argument aggregates and SQL 2003
Date: 2006-04-15 19:22:23
Message-ID: 28290.1145128943@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jim C. Nasby" <jnasby(at)pervasive(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2006-04-15 20:24:48 Re: Google SoC--Idea Request
Previous Message Jim C. Nasby 2006-04-15 19:11:56 Re: two-argument aggregates and SQL 2003