On Tue, Jan 10, 2006 at 10:42:39AM -0500, Lane Van Ingen wrote:
> select * from current_neighbors(2);
>
> ERROR: cannot assign non-composite value to a row variable
> CONTEXT: PL/pgSQL function "current_neighbors" line 15 at assignment
Line 15 of the function is:
> returnValue := 'none';
You've declared returnValue to be a composite type (typ_remote_net)
so you need to assign to a particular column or use a row constructor:
returnValue.remote_net := 'none';
-- or
returnValue := row('none');
Likewise in a few other places. Also, the function's query has a
syntax error:
> order by BY 1,3,2
--
Michael Fuhr