Marco Bubke <marco@bubke.de> writes:
> create type counter_max as (
> maximum real,
> value int );
> create or replace function x_max(counter_max, real) returns counter_max as '
> declare
> maxi alias for $1;
> value alias for $2;
> result counter_max;
I think at the moment you need to say
result counter_max%rowtype;
Otherwise plpgsql thinks "result" has scalar type and doesn't do the
right things.
regards, tom lane