X-Original-To: pgsql-sql@postgresql.org Received: from ozimelb03.ozicom.com (unknown [203.185.247.100]) by postgresql.org (Postfix) with ESMTP id A3687475AD4 for ; Fri, 14 Mar 2003 04:18:42 -0500 (EST) content-class: urn:content-classes:message Subject: parse error when calling function in plpgsql MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Fri, 14 Mar 2003 20:18:42 +1100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: parse error when calling function in plpgsql Thread-Index: AcLqCrTAbJltAevuSZq4HNGtSvA8vg== From: "David Witham" To: X-Archive-Number: 200303/409 X-Sequence-Number: 12448 I have a function that returns a record that works fine when I call it from= psql: mydb=3D# select * from myfunc(...params...) as (col1 real,col2 integer); col1 | col2=20 ---------+---------- 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