From: | <cyw(at)dls(dot)net> |
---|---|
To: | "General PostgreSQL List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: JDBC - Call stored function that returns user defined type |
Date: | 2008-10-25 19:29:26 |
Message-ID: | A0ACCC9851F24342B9E40D0F5A76ABD6@nc05072019 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
While I still don't know who to handle returns with scalars and user defined types mixes, I tested with a function that returns only a SETOF a user defined type, the behavior is the same as a normal select return. You can use ReseultSet to traverse and get each column.
CYW
----- Original Message -----
From: cyw(at)dls(dot)net
To: General PostgreSQL List
Sent: Friday, October 24, 2008 2:23 PM
Subject: [GENERAL] JDBC - Call stored function that returns user defined type
I am looking for info on how to call a stored function that returns a user defined type.
Assume I have a type defined as:
CREATE TYPE XYType AS (x int4, y int4);
and I use CYType in a function such as this:
CREATE FUNCTION test(IN z int4, OUT xy XYType, OUT status character) RETURNS RECORD AS $BODY$.....
I found info on how to formulate a CallableStatement, but no info on how to process the results from the call? Or does Postgres JDBC support this type of calls?
Any help is greatly appreciated.
Regards,
CYW
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas | 2008-10-25 21:11:08 | a LEFT JOIN problem |
Previous Message | Scott Marlowe | 2008-10-25 18:11:39 | Re: support for embedded db and a clustered index? |