Re: [BUGS] We are not following the spec for HAVING without GROUP

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Bruno Wolff III <bruno(at)wolff(dot)to>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUGS] We are not following the spec for HAVING without GROUP
Date: 2005-03-14 05:35:32
Message-ID: 8764zu7psr.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


Bruno Wolff III <bruno(at)wolff(dot)to> writes:

> If someone did a naive implementation of first() and last() aggregates
> for 8.1, is that something that would likely be accepted?

You mean like this?

CREATE FUNCTION first_accum(anyelement,anyelement) RETURNS anyelement as 'select coalesce($1,$2)' LANGUAGE SQL;
CREATE AGGREGATE first (BASETYPE=anyelement, SFUNC=first_accum, STYPE = anyelement);

Though I suspect it would be faster as a native C implementation.

--
greg

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-03-14 05:53:16 Re: BUG #1533: "*OLD*" relation not recognized in CREATE RULE
Previous Message Tom Lane 2005-03-14 05:13:53 Re: BUG #1541: Unusually long INSERT times after fresh clean/CREATE TABLES

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-03-14 05:57:26 Re: Null Value Stored for Date e TimeStamp
Previous Message Qingqing Zhou 2005-03-14 05:19:41 signed short fd