From: Tom Lane <tgl@sss.pgh.pa.us>
To: Owens, Steve <Steve.Owens@usa.xerox.com>
Cc: Pgsql-Interfaces (E-mail) <pgsql-interfaces@postgresql.org>
Subject: Re: Calling SQL functions from ECPG
Date: Tue, 20 Apr 2004 23:50:06 -0400
Message-ID: <25615.1082519406@sss.pgh.pa.us> (raw)
In-Reply-To: <1DD88DDBBB83D6119C8C00096BB0408F0AE89E28@usamcms5.mc.usa.xerox.com>
References: <1DD88DDBBB83D6119C8C00096BB0408F0AE89E28@usamcms5.mc.usa.xerox.com>
"Owens, Steve" <Steve.Owens@usa.xerox.com> writes:
> EXEC SQL SELECT get_foo(1) INTO :record;
> I get a "ERROR: Cannot display record of type RECORD at line 26".
I know zip about ECPG, but I'd think a more likely bet is
EXEC SQL SELECT * INTO :record FROM get_foo(1);
or
EXEC SQL SELECT * FROM get_foo(1) INTO :record;
depending on what your theology is about the placement of INTO. The
point is that a function returning setof-record is a table source and
should appear in FROM.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, Steve.Owens@usa.xerox.com
Subject: Re: Calling SQL functions from ECPG
In-Reply-To: <25615.1082519406@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox