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: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 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 [EMAIL PROTECTED] 
> so that your
>        message can get through to the mailing list cleanly
> 

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to