From: Koichi S. <koi...@gm...> - 2014-02-01 08:12:25
|
You need to define collection function for an aggregate too. Description will be found at http://postgres-xc.sourceforge.net/docs/1_1/sql-createaggregate.html Regards; --- Koichi Suzuki 2014-02-01 David E. Wheeler <da...@ju...>: > PGXC Hackers, > > I built and installed Andrew Dunstan's json_enhancements extension. It's a backport of the 9.3 JSON functions to 9.2. The build worked fine, but when I tried to create the extension I got an error: > > dwheeler=# create extension hstore; > CREATE EXTENSION > dwheeler=# create extension json_enhancements; > ERROR: unsafe use of pseudo-type "internal" > DETAIL: Transition type can not be "internal". > > I poked and prodded the file until I figured out the statement it didn't like. It's this one: > > CREATE AGGREGATE json_agg(anyelement) ( > SFUNC = json_agg_transfn, > FINALFUNC = json_agg_finalfn, > STYPE = internal > ); > > Looking at the code, I see that this is forbidden in XC: > > https://github.com/postgres-xc/postgres-xc/blob/master/src/backend/catalog/pg_aggregate.c#L95 > > Is there a workaround for this? > > Thanks, > > David > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |