Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 4F7E71337B49 for ; Sun, 13 Feb 2011 14:03: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 05925-03 for ; Sun, 13 Feb 2011 18:03:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by mail.postgresql.org (Postfix) with ESMTP id 475B61337B2F for ; Sun, 13 Feb 2011 14:03:33 -0400 (AST) Received: by ewy5 with SMTP id 5so1988860ewy.19 for ; Sun, 13 Feb 2011 10:03:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=0hJ90W6HN4fY2O04kUjPSoazOOFAOQyBL8OmRj0k8kA=; b=G+sJYjkLOR70uSexmGo6sGAEOK0HKwBsaAwKxxp/mBU+Rrws4CBzFfOcanqil86TQC vnYCFKrgzL7/QJQhZ0wzw0FhYeS0nJt5nm1OPykivXM9jNisvFJIJcak8FfuczelXi6Z UmctH67WG0jTvZoib5iDQTzKb7sd7Tck7Qaaw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=bVxNO9nXReARbhzZBy+d5s8sKvnoPMCvqHp4iBLDx4y112eNjF/Vi98wvn17ZfB/VZ DrzH0QdoERusM++olh4yr+uhx58Nrf/I2bKQnGzPD/4E+raFVo73IgfDnnvWlSY8UyIi k8TF9iQ4528RywsHQDXIw54kMuA/LBt11rVT8= Received: by 10.213.27.202 with SMTP id j10mr2936541ebc.49.1297620210156; Sun, 13 Feb 2011 10:03:30 -0800 (PST) Received: from [192.168.0.100] (238.80-202-60.nextgentel.com [80.202.60.238]) by mx.google.com with ESMTPS id u1sm1680574eeh.16.2011.02.13.10.03.29 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 13 Feb 2011 10:03:29 -0800 (PST) Subject: Re: UDT arrays From: Thor Michael =?ISO-8859-1?Q?St=F8re?= To: =?UTF-8?Q?Rados=C5=82aw?= Smogura Cc: Lukas Eder , pgsql-jdbc@postgresql.org In-Reply-To: <201102101126.00740.rsmogura@softperience.eu> References: <68ad45f0-460b-4483-a4df-13b69777707f@s18g2000vbe.googlegroups.com> <201102091029.28960.rsmogura@softperience.eu> <201102101126.00740.rsmogura@softperience.eu> Content-Type: text/plain; charset="UTF-8" Date: Sun, 13 Feb 2011 19:03:29 +0100 Message-Id: <1297620209.4457.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201102/75 X-Sequence-Number: 21473 Excuse me for butting in, but am I right in understanding that you're only talking about the Softperience JDBC driver, not the official one? http://softperience.eu/pages/cmn/ngpgjdbc.xhtml Like Lukas I'm also writing a database tool (though mine works on rather different principles), and I'm also extremely interested in support for UDT's and arrays of UDT's. - thormick On Thu, 2011-02-10 at 11:26 +0100, Radosław Smogura wrote: > I plan to sleep PGObjects, and wake for backward compatibility (maybe as > deprectaed or some parts of methodes there - there are static methods, which > causes problems with JDBC4 Exception model and some per connection specific > functionaly). Arrays parsing is different in text and in binary mode, and > binary mode requires more carefull casting. Actually current flow should allow > to read any nested type, which is supported by ResultSet, form parent object > (I putted only exception for getting result set with multidimensional arrays). > > I plan to give support for specific PG objects like box, but make them more > portable, without internal connection with JDBC dirver logic (you should be > able to serialize and deserialzie those objects on clients without > postgresql.jar). I plan as well to give "plugable" support for custom PG > objects, which can't be processed as UDT (above box is example). I think about > mapping some PG objects to standard Java classes e.g. PG's box -> java.awt.Box > (but this is far future). Above must be done in descriptive way, to be usable > 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 > preventing writing thousend lines of code if binary format for given object > will be different per DB level or per new protocol (see e.g. problems with > bytea encoding in 9.x releases).