BUG #5298: emedded SQL in C to get the record type from plpgsql

From: "George" <sunduozhong(at)revenco(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5298: emedded SQL in C to get the record type from plpgsql
Date: 2010-01-28 04:13:15
Message-ID: 201001280413.o0S4DFJX029357@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5298
Logged by: George
Email address: sunduozhong(at)revenco(dot)com
PostgreSQL version: 8.4.2
Operating system: Red Hat Linux AS 4
Description: emedded SQL in C to get the record type from plpgsql
Details:

CREATE OR REPLACE FUNCTION test4(IN a integer, OUT b int,OUT c int) AS
$BODY$
declare
begin
b:=100;
c:=200;
return;
END $BODY$
LANGUAGE 'plpgsql' VOLATILE
COST 100;

int test(int a)
{

EXEC SQL TYPE my_type IS STRUCT
{
int b[1];
int c[1];
};

EXEC SQL BEGIN DECLARE SECTION;
my_type ppp;
EXEC SQL END DECLARE SECTION;

EXEC SQL WHENEVER sqlerror SQLPRINT;

EXEC SQL select test4(1) into :ppp;
EXEC SQL COMMIT;
return 0;

}

So how can emedded SQL in C to get the record type which returning from
plpgsql function?
My project is migrating from Oracle to postgresql,can you help me ?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sun Duozhong (孙多忠) 2010-01-28 05:01:40 emedded SQL in C to get the record type from plpgsql
Previous Message Jim Mlodgenski 2010-01-28 01:22:52 Re: Amazon EC2 CPU Utilization