Re: COPY support in JDBC driver?

From: mark_addleman(at)bigfoot(dot)com
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: COPY support in JDBC driver?
Date: 2008-10-15 23:14:07
Message-ID: fe87cb7a-c255-4391-9139-6ae1d003d4d2@k36g2000pri.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Sep 24, 7:06 am, m(dot)na(dot)(dot)(dot)(at)gmail(dot)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.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Nacos 2008-10-16 09:13:55 Re: COPY support in JDBC driver?
Previous Message Craig Ringer 2008-10-15 07:09:13 Re: PSQLException - How to Identify Type?