I'm using Postgres 8.3 and wrote the below function to return all matching records. When I try to execute the function, I get the following error:
ERROR: a column definition list is required for functions returning "record"
Any help would be greatly appreciated.
CREATE OR REPLACE FUNCTION getCustomer(IN name character varying(50))
RETURNS setof record AS
SELECT * FROM Customer WHERE name LIKE '%'||$1||'%';
LANGUAGE 'sql' VOLATILE