Home > Archive > PostgreSQL JDBC > December 2005 > Passing an array or record to a stored procedure through jdbc









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Passing an array or record to a stored procedure through jdbc
Roshan Nair

2005-12-09, 3:24 am

Hi all,

I'm using Postgresql 8.1 with driver postgresql-8.1-404.jdbc3.jar . Our
project depends a lot on stored procedures(pl/pgsql). We need to pass
arrays, records and in some cases array of records as a parameter to
the stored procedure. I've searched the mailing lists and googled a lot
but found no solution. For now, we are passing a varchar of
comma-separated values and parsing this in the stored procedure. But
this solution becomes non-trivial when we are using array of records.
I would like to know if we can pass/return arrays and records using jdbc
to/from postgres stored procedures. I guess even multidimensional arrays
are fine, if we cant have records.
Is it possible to implement and add our own array types or record types
easily?(I'm a beginner-intermediate jdbc user).
The jdbc.postgres home page seems to say array support is a feature for
8.2, but the 8.1-404 jdbc driver already contains array type.

Regards,
Roshan Nair

----------------------------------------------------------
Netcore Solutions Pvt. Ltd.
Website: http://www.netcore.co.in
Spamtraps: http://cleanmail.netcore.co.in/directory.html

Support FAQ : http://support.netcore.co.in/
----------------------------------------------------------


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com