Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-in-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group