Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9CF4F1337B4A for ; Wed, 23 Feb 2011 17:51:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 29066-01 for ; Wed, 23 Feb 2011 21:51:34 +0000 (UTC) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 36A9A1337B34 for ; Wed, 23 Feb 2011 17:51:34 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.4/8.14.4) with ESMTP id p1NLpXSM095363 for ; Wed, 23 Feb 2011 17:51:33 -0400 (AST) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.4/8.14.4/Submit) id p1NLjSI6083742 for pgsql-jdbc@postgresql.org; Wed, 23 Feb 2011 17:45:28 -0400 (AST) (envelope-from news) From: Lukas Eder X-Newsgroups: pgsql.interfaces.jdbc Subject: Re: UDT arrays Date: Wed, 23 Feb 2011 13:45:28 -0800 (PST) Organization: http://groups.google.com Lines: 34 Message-ID: <3a2e9872-dfd2-48ea-94d8-6cc72b3d5a28@x13g2000vbe.googlegroups.com> References: <68ad45f0-460b-4483-a4df-13b69777707f@s18g2000vbe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Complaints-To: groups-abuse@google.com Complaints-To: groups-abuse@google.com Injection-Info: x13g2000vbe.googlegroups.com; posting-host=84.226.225.97; posting-account=d-0LKgoAAAAJO2EAMsE9Fr3B1FPy2ZZq User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13,gzip(gfe) To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, T_RP_MATCHES_RCVD=-0.01, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201102/136 X-Sequence-Number: 21534 On Feb 8, 12:26=A0am, Lukas Eder wrote: > I was wondering, is JDBC driver support for the combination of UDT's > and arrays planned for the near future? I couldn't find any > documentation on the JDBC drivers website. After the rather confusing input about a third-party JDBC driver, I can confirm that access to UDT arrays is possible via the standard JDBC driver, if done like this: // This returns a serialised array. Not very convenient ResultSet rs =3D... String serialised =3D rs.getObject(index); Or like this // This allows for iterating over array elements // and assembling it manually. I'll use this method // in jOOQ ResultSet rs =3D... ResultSet iterator =3D rs.getArray(index).getResultSet(); But not like this // This would be most convenient ResultSet rs =3D... Object[] array =3D rs.getArray(index).getArray(); > Is there any specific reason (apart from the fact that UDT's and/or > ARRAYs are not used often) for this lack of implementation? Clearly, > the database itself supports this combination. I can easily insert and > select data from a table holding UDT arrays The question was answered in another thread. I can live with the above workaround...