Re: array_agg() NULL Handling - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: array_agg() NULL Handling
Date
Msg-id 98DC2665-75D3-4B2F-BACA-7DEED9A0C118@kineticode.com
Whole thread Raw
In response to Re: array_agg() NULL Handling  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On Sep 1, 2010, at 11:52 AM, Pavel Stehule wrote:

>> regression=# create or replace function array_agg_transfn_strict(internal, anyelement) returns internal as
'array_agg_transfn'language internal immutable; 
>> CREATE FUNCTION
>> regression=# create aggregate array_agg_strict(anyelement) (stype = internal,
>> sfunc = array_agg_transfn_strict, finalfunc = array_agg_finalfn);
>> CREATE AGGREGATE
>> regression=# create or replace function array_agg_transfn_strict(internal, anyelement) returns internal as
'array_agg_transfn'language internal strict immutable; 
>> CREATE FUNCTION
>>
>
> nice dark trick :) -  but it doesn't work
>
> ERROR:  aggregate 16395 needs to have compatible input type and transition type
> postgres=#

I could use this trick now. Anyone got any bright ideas how to fix it?

Thanks,

David



pgsql-hackers by date:

Previous
From: Josh Kupershmidt
Date:
Subject: Re: I: About "Our CLUSTER implementation is pessimal" patch
Next
From: Andrew Dunstan
Date:
Subject: missing tags