You have to call the function in the following form:
SELECT * FROM get_test_data(1) AS (field1 type, field2 type, ...)
In words, you have to tell the database how the data returned by the
function has to be interpreted.
Greetings,
Matthias
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of
> Rikard Pavelic
> Sent: Tuesday, December 12, 2006 3:06 PM
> To: Shoaib Mir; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] returning parameters from function
>
> This doesn't work. ;(
> I get ERROR: a column definition list is required for functions
> returning "record"
> SQL state: 42601
> when running this function
>
> Regards,
> Rikard
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org
> so that your
> message can get through to the mailing list cleanly
>