Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 98A091337BC4 for ; Thu, 10 Feb 2011 06:55:46 -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 70464-07 for ; Thu, 10 Feb 2011 10:55:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id 629CE1337BC2 for ; Thu, 10 Feb 2011 06:55:38 -0400 (AST) Received: by bwz15 with SMTP id 15so1958442bwz.19 for ; Thu, 10 Feb 2011 02:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Fbx/WSbB1zPKPQg9ZQjyOBRllcE3GIhkohdztgN9c0Q=; b=Hp0Pi7BngXfpC5oXCmj6UBkZa72G8zW+GufpAoDQaMYnPo8Z9UENR4IWGOJJ3GFz4A P276jWMibAR3oH5NRYma94LUVXCQBVJIb4Xg00OQNAwgjJQiMPyhuJRg8THD9/Pw4dxh RSs/JCnjZSyefPcqL9JVds+eKPW8ToPWnV5M4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=lQJOn2oB4SDdiREhbGa54+vG+9GTikeOqSpgJiy16q3IPtkezUWN7TBdtpO5tjp1vr 6VgZnGgqCK+B2bpBvlV6qxhsclzR1PVwohSP8+/D4HNwiCKrvGe6OARhPWnk+Mmk3/mL e+0ezJ6U6VOft5HHJsoKsf9Y5uYIWR2PXgwWg= MIME-Version: 1.0 Received: by 10.204.80.70 with SMTP id s6mr1752261bkk.142.1297335337454; Thu, 10 Feb 2011 02:55:37 -0800 (PST) Received: by 10.204.179.12 with HTTP; Thu, 10 Feb 2011 02:55:37 -0800 (PST) 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> Date: Thu, 10 Feb 2011 11:55:37 +0100 Message-ID: Subject: Re: UDT arrays From: Lukas Eder To: =?UTF-8?Q?Rados=C5=82aw_Smogura?= Cc: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=0016e6db670ef18f37049beb6b26 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201102/71 X-Sequence-Number: 21469 --0016e6db670ef18f37049beb6b26 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alright, thanks for the information! I'll be looking forward to adapt my database abstraction library jOOQ (http://jooq.sourceforge.net) when this i= s done. Do you have any schedule for these improvements? Any time in early 2011? 2011/2/10 Rados=C5=82aw Smogura > 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 specif= ic > 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 mo= re > 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 i= n > way > preventing writing thousend lines of code if binary format for given obje= ct > will be different per DB level or per new protocol (see e.g. problems wit= h > bytea encoding in 9.x releases). > > Lukas Eder Thursday 10 February 2011 10:45:17 > > Hi Radoslaw, > > > > 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 ar= e > > actually going to plan to implement a combination of UDT and ARRAY, suc= h > as > > > > CREATE TYPE composite_type AS (f1 int, f2 text); > > CREATE TABLE t (array_of_composites composite_type[]); > > > > This works in Postgres, but is not supported by the JDBC driver... Are > you > > going to address that as well, in the near future? > > > > Cheers > > Lukas > > > > 2011/2/9 Rados=C5=82aw Smogura > > > > > 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 ?). > > > > > > 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 > > > > > > 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. > > > > > > In both of this I need to do / write full tests for many compilations > of > > > resultset/arrays/structs. > > > > > > 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). > > > > > > I want to resolve some serius bugs about resultsets and SQLXML, too, > > > before release (this with result set may wait, if only one person fou= nd > > > it, and not > > > even found full problem...), but SQLXML is important as XML is popula= r > > > solution. > > > > > > Maybe "true" async notifications based on listener pattern will be > > > included in > > > release. > > > > > > Have a nice day > > > > > > Lukas Eder Tuesday 08 February 2011 00:26:58 > > > > > > > Hello, > > > > > > > > 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. > > > > > > > > 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 > > > > > > > > Cheers > > > > Lukas > --0016e6db670ef18f37049beb6b26 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alright, thanks for the information! I'll be looking forward to adapt m= y database abstraction library jOOQ (http://jooq.sourceforge.net) when this is done. Do you have any sched= ule for these improvements? Any time in early 2011?

2011/2/10 Rados=C5=82aw Smogura <rsmogura@softperience= .eu>
I plan to sleep PGObjects, and wake for backward compatibility (maybe as deprectaed or some parts of methodes there - there are static methods, whic= h
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 al= low
to read any nested type, which is supported by ResultSet, form parent objec= t
(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=
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 cu= stom PG
objects, which can't be processed as UDT (above box is example). I thin= k about
mapping some PG objects to standard Java classes e.g. PG's box -> ja= va.awt.Box
(but this is far future). Above must be done in descriptive way, to be usab= le
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<= br> bytea encoding in 9.x releases).

Lukas Eder <lukas.eder@gmail.com= > Thursday 10 February 2011 10:45:17
> Hi Radoslaw,
>
> 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 y= ou are
> actually going to plan to implement a combination of UDT and ARRAY, su= ch as
>
> CREATE TYPE composite_type AS (f1 int, f2 text);
> CREATE TABLE t (array_of_composites composite_type[]);
>
> This works in Postgres, but is not supported by the JDBC driver... Are= you
> going to address that as well, in the near future?
>
> Cheers
> Lukas
>
> 2011/2/9 Rados=C5=82aw Smogura <rsmogura@softperience.eu>
>
> > Actully I've done support for Structs, with fixation of metda= ta bugs for
> > those
> > types (JDBC spec is not clear, about metadata), but only in binar= y mode.
> > I will, probably, don't give support for text protocol, becau= se I belive
> > binary
> > protocol is future (but here is ?).
> >
> > Currently
> > 1. I need to give full support for SQLData, Input & Output, a= s well
> > implement
> > last type (time with timezone).
> > 2. I need do something with DISTINCTS/DOMAINS
> >
> > Problem is with timestamap with timezone, as on this field backen= d is
> > incompatible with JDBC, so probably driver will need to extend da= tabase,
> > or I
> > need to do some "unsafe" operations or throw exception = for some
> > situations.
> >
> > In both of this I need to do / write full tests for many compilat= ions of
> > resultset/arrays/structs.
> >
> > Some functionality will temporaly go away (eg. updating result se= ts,
> > arrays returning result sets for mulitdimensional array, geometri= c
> > types, and all PG*Objects will be sleeped too).
> >
> > I want to resolve some serius bugs about resultsets and SQLXML, t= oo,
> > 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 po= pular
> > solution.
> >
> > Maybe "true" async notifications based on listener patt= ern will be
> > included in
> > release.
> >
> > Have a nice day
> >
> > Lukas Eder <lukas.eder= @gmail.com> Tuesday 08 February 2011 00:26:58
> >
> > > Hello,
> > >
> > > 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.
> > >
> > > Is there any specific reason (apart from the fact that UDT&#= 39;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
> > >
> > > Cheers
> > > Lukas

--0016e6db670ef18f37049beb6b26--