Thread: Query
Hi,
I have a query regarding composite types (user-defined types). I have defined a type alongwith its input and output functions. But I am not able to access the type using my PL/pgSQL function. My type is as follows
typedef struct Sample
{
int nCtr1,
int nCtr2
} Sam;
I have defined the input and output functions as sample_in and sample_out in C and in PostGreSQL backend as well. Now I want to use the above type in my procedure.
My PL/pgSQL procedure is as follows :
create function test() returns char as '
declare
Sample test;
char var1;
begin
select sample_in('1,2') into test;
select sample_out(test) into var1;
return var1;
end;
' language 'plpgsql'
I want to access the members nCtr1 and nCtr2 of the aboe defined type from EJB using JDBC.
If anyone has some clue about it please mail back.
My email-id is atulk@newgen.co.in