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

Re: Synthesize support for Statement.getGeneratedKeys()?

From: Ken Johanson <pg-user(at)kensystem(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
Date: 2007-01-28 15:51:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
>> In implementing Statement.executeUpdate(String sql,String[] 
>> columnNames), does any know how I could go about sending the sql and 
>> subsequent RETURNING clause directly to a stream? Just so I can avoid 
>> double-buffering the query (allocated in the sql, and second in the 
>> StringBuffer I'd be appending the RETURNING clause to).
> Don't worry about this minor overhead.  So much other manipulation and 
> object creation happens (even forgetting the network trip) that this 
> will be in the noise.

Hmm, this might be an area I'd enjoy contributing code for.. if there 
are places now where there is avoidable double or triple allocation 
(like in my patch) (where it could instead be handled by streams and/or 
finer grained chunks), and since the driver (apparently) already has 
some stream based utils... maybe I could try to improve those.

I know from experience with other tools that unnec allocation can play 
havoc under high load and/or very large data sets, using (resizeable) 
buffers (like StringBuffer). When that code gets optimized the 
application becomes much more responsive.

If you know of any places in the driver that could benefit from this, 
please let me know.


In response to

pgsql-jdbc by date

Next:From: Thomas KellererDate: 2007-01-28 17:26:19
Subject: Strange result from DatabaseMetaData.getTablePrivileges()
Previous:From: Kris JurkaDate: 2007-01-28 02:18:31
Subject: Re: escape string for pgsql (using jdbc/java)?

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