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: 45BCC675.5050000@kensystem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

ken

In response to

Browse pgsql-jdbc by date

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