X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 35C09D1CACC for ; Wed, 28 Jul 2004 00:30:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06511-01 for ; Wed, 28 Jul 2004 03:30:36 +0000 (GMT) Received: from www.postgresql.com (www.postgresql.com [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id 2CEF0D1CC13 for ; Wed, 28 Jul 2004 00:22:21 -0300 (ADT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by www.postgresql.com (Postfix) with ESMTP id 43CC9CF4883 for ; Tue, 27 Jul 2004 19:22:15 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=opencloud.com) by yass.opencloud.co.nz with asmtp (Exim 3.35 #1 (Debian)) id 1BpaHq-00073U-00; Wed, 28 Jul 2004 10:19:06 +1200 Message-ID: <4106D4D7.6070902@opencloud.com> Date: Wed, 28 Jul 2004 10:19:03 +1200 From: Oliver Jowett User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Hallgren Cc: pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] Binary Cursors, and the COPY command References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com> <410574F9.9020103@opencloud.com> <4105FF43.40508@opencloud.com> <410628B9.2080800@opencloud.com> <41063C77.6050305@mailblocks.com> <41063FFE.8030400@opencloud.com> <4106517C.2090802@mailblocks.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200407/308 X-Sequence-Number: 10692 Thomas Hallgren wrote: > I'm the author of PL/Java. It uses its own JDBC driver on top of SPI. > The main reason for thas is that I don't want the overhead of streaming > data and flipping byte order when everything is readily available in > memory. When "client" and "server" resides in the same process the > overhead is measurable. By using java.nio in your JDBC, I beleive it > would be possible to not just use native byte ordering, but perhaps also > to create a nice abstraction allowing direct access to structures in > memory rather than streaming data, thus obliviate the need for my own > driver. And PL/Java will never run on Java 1.3 or older :-) > > Do you have any opinion on that? This is a *lot* of work. There are bigger issues to deal with than the use of NIO -- lots of the higher-level JDBC code makes assumptions about the details of the protocol it is speaking. I've made some inroads on that front with the V3 protocol rewrite I did recently but there will still be a lot more work in that area. That said, I can see that it might work with "SPI within the same process" as a new underlying "protocol". That could use NIO or whatever you want, and conditionally build that code only when 1.4 + the SPI interface is available. The query/parameter abstraction that's currently in place is intended to give the protocol flexibility about how it represents the data (although it is pretty basic at the moment) so I don't think it'd be necessary to have NIO in the protocol-independent parts of the driver. Anyway, good luck :) -O