Re: syntax issue with custom aggregator

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Lucas F(dot)" <lucasf(at)vagabond-software(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: syntax issue with custom aggregator
Date: 2005-03-25 19:56:03
Message-ID: 20050325195603.GA8604@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 25, 2005 at 02:39:11PM -0500, Tom Lane wrote:
> "Lucas F." <lucasf(at)vagabond-software(dot)com> writes:
> > CREATE AGGREGATE "property"."pos_avg" ( BASETYPE = "int2",
> > SFUNC = "property"."ag_pos_avg_accum", STYPE = "_int4",
> > FINALFUNC = "property"."ag_pos_avg_final", INITCOND = "'{0,0}'");
>
> Too many quotes ... try INITCOND = '{0,0}'

Also, check the array subscripts in your functions. By default,
PostgreSQL array subscripts start at 1, not 0.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ragnar Hafstað 2005-03-25 20:07:57 Re: sort array optimisation in pl/perl
Previous Message Andrus Moor 2005-03-25 19:39:41 Re: Referential integrity using constant in foreign key