pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roshan Nair <roshan@netcore.co.in>
To: pgsql-jdbc@postgresql.org
Subject: Passing an array or record to a stored procedure through jdbc
Date: Fri, 09 Dec 2005 12:29:45 +0530
Message-ID: <43992B61.8030503@netcore.co.in> (raw)

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/
----------------------------------------------------------




Message-ID: <43992B61.8030503@netcore.co.in>
Permalink:  ../43992B61.8030503@netcore.co.in/
Also on:    postgresql.org/message-id/43992B61.8030503@netcore.co.in

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: roshan@netcore.co.in
  Subject: Re: Passing an array or record to a stored procedure through jdbc
  In-Reply-To: <43992B61.8030503@netcore.co.in>
  References: <43992B61.8030503@netcore.co.in>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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