Initialize the User-defined Aggregate in ECPG

From: Chengjie Qin <cqin3(at)ucmerced(dot)edu>
To: <pgsql-in-general(at)postgresql(dot)org>
Subject: Initialize the User-defined Aggregate in ECPG
Date: 2012-03-20 00:07:53
Message-ID: 8aef23d94f9dfa84625ece53b3ac53c9@mail2.ucmerced.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-in-general

Hi all,

I'm using the embedded SQL in C to create the User-Defined
Aggregate(UDA).
The command is :
CREATE AGGREGATE aggname( sfunc=kmeans,
stype=double precision[],
finalfunc=kmeansfinal,
INITCOND='{1,2,3}');

Since I need to do the aggregation in multiple rounds. I need to
initialize
the INITCOND using the execution result of last execution
(aggregation.)
Any one can tell me how can I initialize the INITCOND using host
variables
instead of hard code the INITCOND?

Thanks.

Jay

Responses

Browse pgsql-in-general by date

  From Date Subject
Next Message Ashutosh Bapat 2012-03-20 04:06:13 Re: Initialize the User-defined Aggregate in ECPG
Previous Message Julien Rouhaud 2012-03-06 10:44:38 Re: [ADMIN] pg_dump : no tables were found.