Andy Halsall <halsall_andy@hotmail.com> writes:
> My stored procedure looks like this:
> CREATE OR REPLACE FUNCTION readnode4(bigint) RETURNS appexcatdata AS '
> declare
> h appexcatdata;
> begin
> select INTO h r.user_data, n.system_data FROM relationship r INNER JOIN node_system n ON n.node_id = r.node_id
WHEREr.node_id = $1 LIMIT 1;
> RETURN h;
> end
> '
> language 'plpgsql';
[ which is queried as ]
> "SELECT readnode4($1)",
I think you probably want "SELECT * FROM readnode4($1)". As-is,
you're getting a single composite-type column from the SELECT.
regards, tom lane