Re: max(*)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: max(*)
Date: 2006-05-26 19:35:20
Message-ID: 20060526193520.GA24444@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 26, 2006 at 14:06:29 -0500,
"Jim C. Nasby" <jnasby(at)pervasive(dot)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.

In response to

  • Re: max(*) at 2006-05-26 19:06:29 from Jim C. Nasby

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-05-26 19:37:51 Re: max(*)
Previous Message Jim C. Nasby 2006-05-26 19:06:29 Re: max(*)