From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Fernando Nasser <fnasser(at)redhat(dot)com> |
Cc: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Please help with binary file |
Date: | 2003-07-03 23:31:58 |
Message-ID: | 20030703233156.GA10547@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
On Thu, Jul 03, 2003 at 09:50:53AM -0400, Fernando Nasser wrote:
> >>From a quick look at your patch, though, it appears to only touch
> >setBinaryStream()? From memory, we use setBytes(), so this may not be an
> >issue for us (although we'd like to keep the option of using
> >setBinaryStream()).
> >
>
> Yes, the idea was use setBinaryStream() if you want to use this method
> (we cannot do much for setBytes() anyway as we need the stream). Of
> course, Barry's suggestion makes it much better as it allows one to use
> setBinaryStream() for small data as well.
Isn't streaming a win for setBytes() with large bytearrays? If I have an
existing 1mb byte array to insert, the current driver will need 2-3mb of
temporary string space for setBytes(), I think?
I suppose the app can always wrap it in a ByteArrayInputStream and use
setBinaryStream(), though.
> If there is a lot of interest in this fix for 7.3 and 7.2 backends, and
> you can convince Barry to incorporate it (with his proposed changes) in
> the driver, I can ask for time to get it in shape for submission. But I
> won't be able to do it unless it goes into the main line of code -- I
> already have to work on the 7.4 version (V3 protocol).
We don't benefit from the patch as we don't deal with large bytea fields, I
just wanted to make sure our insert performance didn't suffer if the patch
did get applied. It sounds like that won't be a problem, thanks for
clarifying things.
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Gianluca Chiodaroli | 2003-07-04 07:37:28 | Re: Risposta: Re: How to obtain JDBC |
Previous Message | Darin Ohashi | 2003-07-03 21:06:41 | Re: java.sql.SQLException: 1 >= 1 |