Query

From: "Atul" <atulk(at)newgen(dot)co(dot)in>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Query
Date: 2001-04-07 06:19:31
Message-ID: 001101c0bf2a$b4f65cb0$5e05a8c0@atul
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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(at)newgen(dot)co(dot)in

Browse pgsql-novice by date

  From Date Subject
Next Message Louis-David Mitterrand 2001-04-08 09:10:06 Re: [GENERAL] Re: Permissons on database
Previous Message Mark Byerley 2001-04-06 17:59:41 replacing tables