X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D2E179DD5EE for ; Fri, 9 Dec 2005 03:37:22 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 14120-09-2 for ; Fri, 9 Dec 2005 03:37:22 -0400 (AST) X-Greylist: delayed 00:30:10.948542 by SQLgrey- Received: from uucp3.netcore.co.in (uucp3.netcore.co.in [202.162.229.13]) by postgresql.org (Postfix) with ESMTP id 0980A9DD620 for ; Fri, 9 Dec 2005 03:37:19 -0400 (AST) Received: from uucp1.netcore.co.in (unknown [192.168.2.1]) by uucp3.netcore.co.in (Postfix) with ESMTP id 1C2873BF7A for ; Fri, 9 Dec 2005 12:36:40 +0530 (IST) Received: by uucp1.netcore.co.in (Postfix, from userid 10) id 09F8F25DDCD; Fri, 9 Dec 2005 12:37:00 +0530 (IST) Received: from [192.168.2.168] (unknown [192.168.2.168]) by ho.netcore.co.in (Postfix) with ESMTP id 4303C834028 for ; Fri, 9 Dec 2005 12:42:54 +0530 (IST) Message-ID: <43992B61.8030503@netcore.co.in> Date: Fri, 09 Dec 2005 12:29:45 +0530 From: Roshan Nair User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050715) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Passing an array or record to a stored procedure through jdbc Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MailServ-MailFilter-MailScanner-Information: Please contact the ISP for more information X-MailServ-MailFilter-MailScanner: Found to be clean X-MailScanner-From: roshan@netcore.co.in X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/45 X-Sequence-Number: 14376 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/ ----------------------------------------------------------