pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedreceiving user defined types from a function?
2+ messages / 2 participants
[nested] [flat]
* receiving user defined types from a function?
@ 2004-03-23 23:53 Dario Bahena <darbahena@santander.com.mx>
2004-03-26 21:31 ` Re: receiving user defined types from a function? Kris Jurka <books@ejurka.com>
0 siblings, 1 reply; 2+ messages in thread
From: Dario Bahena @ 2004-03-23 23:53 UTC (permalink / raw)
To: pgsql-interfaces
hi ...
I've a postgresql function, that returns a user defined composite type,
is it posible to catch it using the jdbc driver???, cause then I tried
it and saw the class for the object, it gave me just the first member
for my composite type.
Maybe I can return a refcursor which should be mapped to a ResultSet in
java ... but my functions would look less natural, in fact, I've already
changed them cause PostgreSQL doesn't support out parameters.
Thankx.
salu2
dario estepario ...
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: receiving user defined types from a function?
2004-03-23 23:53 receiving user defined types from a function? Dario Bahena <darbahena@santander.com.mx>
@ 2004-03-26 21:31 ` Kris Jurka <books@ejurka.com>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2004-03-26 21:31 UTC (permalink / raw)
To: Dario Bahena Tapia <dario@ciencias.unam.mx>; +Cc: pgsql-interfaces
On Tue, 23 Mar 2004, Dario Bahena wrote:
> hi ...
>
> I've a postgresql function, that returns a user defined composite type,
> is it posible to catch it using the jdbc driver???, cause then I tried
> it and saw the class for the object, it gave me just the first member
> for my composite type.
>
Instead of using a CallableStatement to call a function returning a
complex type the recommended method is to use a regular Statement or
PreparedStatement and simply call the function in a select such as:
SELECT * FROM mycomplexfunction('a',12);
Kris Jurka
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-03-26 21:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23 23:53 receiving user defined types from a function? Dario Bahena <darbahena@santander.com.mx>
2004-03-26 21:31 ` Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox