Re: max(*) - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: max(*)
Date
Msg-id 20060526193520.GA24444@wolff.to
Whole thread Raw
In response to Re: max(*)  ("Jim C. Nasby" <jnasby@pervasive.com>)
List pgsql-hackers
On Fri, May 26, 2006 at 14:06:29 -0500, "Jim C. Nasby" <jnasby@pervasive.com> wrote:
> 
> But if aggregate(*) just gets turned into aggregate(1) by the backend,
> why not just tell people to use aggregate(1) for their custom
> aggregates? Or am I misunderstanding how aggregate(*) is actually
> handled?
> 
> My concern is that it's not inconceiveable to typo max(field) into
> max(*), which could make for a rather frustrating error. Not to mention
> this being something that could trip newbies up. If nothing else I'd say
> it warrants a %TODO just so it doesn't end up on the PostgreSQL gotcha's
> page. :)

Tom's suggestion that (*) map to () which would refer to a zero argument
aggregate would cover this case, since there wouldn't be a zero argument
version of max.


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: max(*)
Next
From: Tom Lane
Date:
Subject: Re: max(*)