Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Binary Cursors, and the COPY command

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Date: 2004-07-27 22:19:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-jdbc
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 :)


In response to

pgsql-hackers by date

Next:From: Christopher Kings-LynneDate: 2004-07-28 02:14:33
Subject: No mail?
Previous:From: markwDate: 2004-07-27 17:41:48
Subject: Re: [PATCHES] Point in Time Recovery

pgsql-jdbc by date

Next:From: Guido FialaDate: 2004-07-28 06:39:56
Subject: fetchsize dynamically changeable?
Previous:From: Thomas HallgrenDate: 2004-07-27 12:58:36
Subject: Re: [HACKERS] Binary Cursors, and the COPY command

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group