Re: COPY support in JDBC driver? - Mailing list pgsql-jdbc

From mark_addleman@bigfoot.com
Subject Re: COPY support in JDBC driver?
Date
Msg-id fe87cb7a-c255-4391-9139-6ae1d003d4d2@k36g2000pri.googlegroups.com
Whole thread Raw
In response to Re: COPY support in JDBC driver?  (Maciek Sakrejda <msakrejda@truviso.com>)
Responses Re: COPY support in JDBC driver?  ("Michael Nacos" <m.nacos@gmail.com>)
List pgsql-jdbc
On Sep 24, 7:06 am, m.na...@gmail.com ("Michael Nacos") wrote:
> Hi Mark,
>
> if you want COPY support from the JDBC driver just for performance reasons,
> you should probably also consider using the driver's batch mode. Please have
> a look at the following links:
>
>
http://archives.postgresql.org/pgsql-jdbc/2007-04/msg00076.phphttp://freeyourtech.wordpress.com/2008/07/15/using-postgresql-jdbc-fo...
>
> Encoding is a serious consideration. While testing pgBee, I ran into
> problems inserting codepage 1252 files into a SQL_ASCII database, because of
> character mismatches. In your Java application, you may specify a particular
> charset for reading the input files. I haven't used the patch, but if
> support for the COPY operation is to be included in the driver, please make
> sure the driver handles such things with care.
>
> It might also be that the driver shouldn't have to deal with things like
> that. It's a driver for connecting to a DBMS, not a backup-restore solution.
> But I cannot speak on behalf of anyone or anything, I'm pretty much an
> occasional pgsql-jdbc reader.
>
> Michael

Hi, Michael -

Thanks for the batch pointer.  We are currently using batches with
varying sizes but still aren't getting the performance we'd like.

As for including the COPY facility in the JDBC driver versus doing
bulk loads from a command line utility:  Our online application
receives an immense amount of data periodically and must store that
data into Postgres before the next bulk arrives.  It makes sense to
process and store this data entirely within the confines of a JVM and
within a transaction thus COPY support in the JDBC driver is very
helpful for us.


pgsql-jdbc by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PSQLException - How to Identify Type?
Next
From: "Michael Nacos"
Date:
Subject: Re: COPY support in JDBC driver?