From: Radosław Smogura <mail@smogura.eu>
To: pgsql-jdbc@postgresql.org, Александър Шопов <lists@kambanaria.org>
To: PG Hackers <pgsql-hackers@postgresql.org>
Subject: Improved JDBC driver part 2
Date: Tue, 30 Nov 2010 19:49:03 +0100
Message-ID: <201011301949.03336.mail@smogura.eu> (raw)
In-Reply-To: <1290631846.3659.9.camel@dalgonosko>
References: <1290631846.3659.9.camel@dalgonosko>
Hello,
Maybe you are interested about this what I done with JDBC
=== Original driver (Text mode) ===
* Memory *
1. Memory usage improvments when using result set input streams (no uneeded
memory copy) - needs few touches for bigger performance.
2. Memory usage improvments for large data, should be no problem to load 1GB
bytea[] when have only 300MB of memory ("threshold" size still hardcoded).
* JDBC 4 *
1. XML are now correctly transformed before send to server - previous version
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
need to do special transformation (does it require libxml?), until character
streams are used.
3. JDBC4 exception throwing.
4. XML objects are readable only once, you can't reuse it, update form result
set (silently set to null on RS.updateRow() - shouldn't be silent) returns
null till refreshRow(), but you can write to them after load.
5.Target XML behavior is streaming behavior to don't repeat problems with
bytea.
* JDBC 4.1 *
1. Just started.
* Others *
1. Few additional test cases. Few utils for XML checking (string equals is too
less) no good, but better.
2. Fixed bug, causing inproper time(stamps) encoding for WITH TIME ZONE fields,
after changing default time zone.
=== Binary mode ===
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. prohibited
(X - base type conversion, x - possible conversion, no x - no base and
possible = 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
original driver).
Driver is here http://www.rsmogura.net/pgsql/pgjdbc_exp_20101130_C.tar.gz is
currently JDK 6 compatible (will be not), compressed patch takes about 136kb
gziped.
Kind regards & have a nice day
----------
Radosław Smogura
http://www.softperience.eu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mail@smogura.eu, lists@kambanaria.org, pgsql-hackers@postgresql.org
Subject: Re: Improved JDBC driver part 2
In-Reply-To: <201011301949.03336.mail@smogura.eu>
References: <1290631846.3659.9.camel@dalgonosko> <201011301949.03336.mail@smogura.eu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox