Re: [SQL] How to create an aggregate?

2004-08-02 Thread Ray Aspeitia
So the AGGREGATE function also references parameters like a regular SQL function. Good to know. Figured I'd ask anyway. Thanks for the info Tom, Greg. Ray A. > I also would like to pass the delimiter to the aggregate as a parameter and I am not sure if it can handle that. It can't. You'll nee

Re: [SQL] How to create an aggregate?

2004-08-01 Thread Greg Stark
Ray Aspeitia <[EMAIL PROTECTED]> writes: > I also would like to pass the delimiter to the aggregate as a parameter and > I am not sure if it can handle that. Currently aggregates that take multiple parameters are just not supported. -- greg ---(end of broadcast)--

Re: [SQL] How to create an aggregate?

2004-07-30 Thread Tom Lane
Ray Aspeitia <[EMAIL PROTECTED]> writes: > I also would like to pass the delimiter to the aggregate as a parameter > and I am not sure if it can handle that. It can't. You'll need a single-argument finalfunc that hardwires the delimiter, ie, array_to_string($1, '|')

[SQL] How to create an aggregate?

2004-07-30 Thread Ray Aspeitia
Not sure if this made it through before I subscribed, so... Hello all, before I ask, this is what I have done so far: -- created this new aggregate function CREATE AGGREGATE groupconcat_array ( SFUNC = array_append, BASETYPE = anyelement, STYPE = anyarray, initcond = '{}' ); -- ran