Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0CC6C1337B8A for ; Thu, 10 Feb 2011 06:25:59 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 40052-06 for ; Thu, 10 Feb 2011 10:25:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.softperience.eu (static-ip-217-118-26-141.inaddr.intergenia.de [217.118.26.141]) by mail.postgresql.org (Postfix) with ESMTP id 0EA131337B54 for ; Thu, 10 Feb 2011 06:25:51 -0400 (AST) Received: from radek.localnet (87-204-194-135.dg-net.pl [87.204.194.135]) by mail.softperience.eu (Postfix) with ESMTPA id BBFF7C000CD; Thu, 10 Feb 2011 11:25:53 +0100 (CET) From: =?utf-8?q?Rados=C5=82aw_Smogura?= To: Lukas Eder Subject: Re: UDT arrays Date: Thu, 10 Feb 2011 11:26:00 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.36-gentoo-r5; KDE/4.4.5; x86_64; ; ) Cc: pgsql-jdbc@postgresql.org References: <68ad45f0-460b-4483-a4df-13b69777707f@s18g2000vbe.googlegroups.com> <201102091029.28960.rsmogura@softperience.eu> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201102101126.00740.rsmogura@softperience.eu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201102/64 X-Sequence-Number: 21462 I plan to sleep PGObjects, and wake for backward compatibility (maybe as=20 deprectaed or some parts of methodes there - there are static methods, whic= h=20 causes problems with JDBC4 Exception model and some per connection specific= =20 functionaly). Arrays parsing is different in text and in binary mode, and=20 binary mode requires more carefull casting. Actually current flow should al= low=20 to read any nested type, which is supported by ResultSet, form parent objec= t=20 (I putted only exception for getting result set with multidimensional array= s). I plan to give support for specific PG objects like box, but make them more= =20 portable, without internal connection with JDBC dirver logic (you should be= =20 able to serialize and deserialzie those objects on clients without=20 postgresql.jar). I plan as well to give "plugable" support for custom PG=20 objects, which can't be processed as UDT (above box is example). I think ab= out=20 mapping some PG objects to standard Java classes e.g. PG's box -> java.awt.= Box=20 (but this is far future). Above must be done in descriptive way, to be usab= le=20 with DataSource and app servers, eg. @Resource private DataSource myPgDataSourceWithMyCustomObjects Both of those should be designed in fast way, low memory consuption and in = way=20 preventing writing thousend lines of code if binary format for given object= =20 will be different per DB level or per new protocol (see e.g. problems with= =20 bytea encoding in 9.x releases). Lukas Eder Thursday 10 February 2011 10:45:17 > Hi Radoslaw, >=20 > Interesting news about SQLData, Input & Output. That's clearly the way to > go. So I assume you're going to be removing the PGobject from the JDBC > driver in a future release? But I still don't understand whether you are > actually going to plan to implement a combination of UDT and ARRAY, such = as >=20 > CREATE TYPE composite_type AS (f1 int, f2 text); > CREATE TABLE t (array_of_composites composite_type[]); >=20 > This works in Postgres, but is not supported by the JDBC driver... Are you > going to address that as well, in the near future? >=20 > Cheers > Lukas >=20 > 2011/2/9 Rados=C5=82aw Smogura >=20 > > Actully I've done support for Structs, with fixation of metdata bugs for > > those > > types (JDBC spec is not clear, about metadata), but only in binary mode. > > I will, probably, don't give support for text protocol, because I belive > > binary > > protocol is future (but here is ?). > >=20 > > Currently > > 1. I need to give full support for SQLData, Input & Output, as well > > implement > > last type (time with timezone). > > 2. I need do something with DISTINCTS/DOMAINS > >=20 > > Problem is with timestamap with timezone, as on this field backend is > > incompatible with JDBC, so probably driver will need to extend database, > > or I > > need to do some "unsafe" operations or throw exception for some > > situations. > >=20 > > In both of this I need to do / write full tests for many compilations of > > resultset/arrays/structs. > >=20 > > Some functionality will temporaly go away (eg. updating result sets, > > arrays returning result sets for mulitdimensional array, geometric > > types, and all PG*Objects will be sleeped too). > >=20 > > I want to resolve some serius bugs about resultsets and SQLXML, too, > > before release (this with result set may wait, if only one person found > > it, and not > > even found full problem...), but SQLXML is important as XML is popular > > solution. > >=20 > > Maybe "true" async notifications based on listener pattern will be > > included in > > release. > >=20 > > Have a nice day > >=20 > > Lukas Eder Tuesday 08 February 2011 00:26:58 > >=20 > > > Hello, > > >=20 > > > 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. > > >=20 > > > 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 > > >=20 > > > Cheers > > > Lukas