parse error when calling function in plpgsql

From: "David Witham" <davidw(at)unidial(dot)com(dot)au>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: parse error when calling function in plpgsql
Date: 2003-03-14 09:18:42
Message-ID: CFA248776934FD43847E740E43C346D1379668@ozimelb03.ozicom.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have a function that returns a record that works fine when I call it from psql:

mydb=# select * from myfunc(...params...) as (col1 real,col2 integer);
col1 | col2
---------+----------
0.806667 | 17000104
(1 row)

I have tried to call it from within another function like this:

...
declare
myrec record;
...
select * into myrec from myfunc(...params...) as (col1 real,col2 integer);
...

but I keep getting a parse error:

WARNING: Error occurred while executing PL/pgSQL function myparentfunc
WARNING: line 27 at select into variables
ERROR: parser: parse error at or near "$1" at character 72

How do I get the record returned from myfunc to be assigned to myrec?

Thanks,
David Witham

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Manfred Koizar 2003-03-14 10:38:30 Re: What's wrong with this group by clause?
Previous Message dev 2003-03-14 08:13:18 Re: Poor performance on a right join