Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 975281337B5D for ; Tue, 30 Nov 2010 14:48:47 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 44593-03; Tue, 30 Nov 2010 18:48:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from faith.micfo.com (faith.micfo.com [64.120.14.82]) by mail.postgresql.org (Postfix) with ESMTP id 0E22C1335B36; Tue, 30 Nov 2010 14:48:38 -0400 (AST) Received: from 87-204-194-135.dg-net.pl ([87.204.194.135]:55002 helo=radek.localnet) by faith.micfo.com with esmtpa (Exim 4.69) (envelope-from ) id 1PNVFg-000875-Nj; Tue, 30 Nov 2010 12:48:33 -0600 From: =?utf-8?q?Rados=C5=82aw_Smogura?= To: pgsql-jdbc@postgresql.org, =?utf-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A=D1=80?= =?utf-8?q?_=D0=A8=D0=BE=D0=BF=D0=BE=D0=B2?= , PG Hackers Subject: Improved JDBC driver part 2 Date: Tue, 30 Nov 2010 19:49:03 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.34-gentoo-r12; KDE/4.4.5; x86_64; ; ) References: <1290631846.3659.9.camel@dalgonosko> In-Reply-To: <1290631846.3659.9.camel@dalgonosko> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201011301949.03336.mail@smogura.eu> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - faith.micfo.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - smogura.eu X-Source: X-Source-Args: X-Source-Dir: 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: 201011/117 X-Sequence-Number: 21238 Hello, Maybe you are interested about this what I done with JDBC =3D=3D=3D Original driver (Text mode) =3D=3D=3D * Memory * 1. Memory usage improvments when using result set input streams (no uneeded= =20 memory copy) - needs few touches for bigger performance. 2. Memory usage improvments for large data, should be no problem to load 1G= B=20 bytea[] when have only 300MB of memory ("threshold" size still hardcoded). * JDBC 4 * 1. XML are now correctly transformed before send to server - previous versi= on=20 used normal text-file transformations that is not enaugh. 2. In all modes (text/binary) XMLs are sended in binary mode, so driver don= 't=20 need to do special transformation (does it require libxml?), until characte= r=20 streams are used. 3. JDBC4 exception throwing. 4. XML objects are readable only once, you can't reuse it, update form resu= lt=20 set (silently set to null on RS.updateRow() - shouldn't be silent) returns= =20 null till refreshRow(), but you can write to them after load.=20 5.Target XML behavior is streaming behavior to don't repeat problems with=20 bytea. * JDBC 4.1 * 1. Just started. * Others * 1. Few additional test cases. Few utils for XML checking (string equals is = too=20 less) no good, but better. 2. Fixed bug, causing inproper time(stamps) encoding for WITH TIME ZONE fie= lds,=20 after changing default time zone. =3D=3D=3D Binary mode =3D=3D=3D 1. Read for almost all data types with arrays. 2. Write for few. 3. Much more restrictive checking when casting form one type to other. 4. Exceptions when casting from one type to other inproper type. 5. Still ResultSet.getString() for XML will return XML - this spec. prohibi= ted=20 (X - base type conversion, x - possible conversion, no x - no base and=20 possible =3D no conversion). 6. No getPriviliges for metadata - no binary output for ACL!!! 7. Many, many tests passed. 8. Data reading is faster for all reads (checked with profiler, against=20 original driver). Driver is here http://www.rsmogura.net/pgsql/pgjdbc_exp_20101130_C.tar.gz i= s=20 currently JDK 6 compatible (will be not), compressed patch takes about 136k= b=20 gziped. Kind regards & have a nice day =2D--------- Rados=C5=82aw Smogura http://www.softperience.eu