> I am confused by your question. It seems it is declared as returning an
> int.
>> CREATE FUNCTION gint4_union(bytea, internal)
>> RETURNS int4
>> AS 'MODULE_PATHNAME'
>> LANGUAGE 'C';
>>
>> but gint4_union does this:
>>
>> INT4KEY *out = palloc(sizeof(INT4KEY));
>> [...]
>> PG_RETURN_POINTER(out);
The function returns type INT4KEY, which is a struct of 2 int4's, but
is declared as returning just int4.
It should be declared to return type int4key, no?
I don't think this actually has any negative consequences, though.
--
Itai Zukerman <http://www.math-hat.com/~zukerman/>