CREATE TABLE testtable
(
id INTEGER,
name VARCHAR(10)
);

INSERT INTO testtable (id, name) VALUES (1, 'Fred');

CREATE OR REPLACE FUNCTION fn_test_get_row(a INTEGER)
RETURNS testtable AS $$
DECLARE
i_row testtable;
BEGIN

SELECT *
INTO   i_row
FROM testtable
WHERE id = a;

-- Success
RETURN i_row;

END;
$$ LANGUAGE plpgsql;

CREATE OR REPLACE FUNCTION testx()
RETURNS testtable AS $$
DECLARE
i_row testtable;
BEGIN

SELECT fn_test_get_row(1)
INTO   i_row;

-- Success
RETURN i_row;

END;
$$ LANGUAGE plpgsql;

select testx();

SELECT fn_test_get_row(1);