Re: Calling SQL functions from ECPG - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Calling SQL functions from ECPG
Date
Msg-id 25615.1082519406@sss.pgh.pa.us
Whole thread Raw
In response to Calling SQL functions from ECPG  ("Owens, Steve" <Steve.Owens@usa.xerox.com>)
List pgsql-interfaces
"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);
orEXEC 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


pgsql-interfaces by date:

Previous
From: "Owens, Steve"
Date:
Subject: Calling SQL functions from ECPG
Next
From: bcsaba@balmazujvaros.hu
Date:
Subject: BLIBPQ.LIB, BLIBPQDLL.LIB or LIBPQ 7.4 problem