revised patch for COPY

From: Michael Adler <adler(at)glimpser(dot)org>
To: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Cc: Kris Jurka <books(at)ejurka(dot)com>, rmischook(at)yahoo(dot)com, Dave Cramer <Dave(at)micro-automation(dot)net>, Barry Lind <blind(at)xythos(dot)com>
Subject: revised patch for COPY
Date: 2003-02-26 17:51:59
Message-ID: Pine.NEB.4.53.0302261227020.6153@reva.sixgirls.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Here's another version of a patch that gives you COPY capabilities. The
difference is that in addition to the simple and default:

copyOut("tablename",outputStream);

you can also access other COPY features by supplying your own COPY query:

copyOutQuery("COPY "+tablename+" WITH OID TO STDOUT DELIMITERS '\t' WITH
NULL AS '\N'",outputStream);

This feature speeds up my application 40x and I bet it will be useful to
others as well. I wrote it to integrate cleanly into the driver, so
please let me know if its not appropriate for the main project.

Comments?

Mike Adler

Attachment Content-Type Size
CopyTest.java text/plain 5.2 KB
copydiff text/plain 8.1 KB
CopyManager.java text/plain 7.7 KB

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rich Cullingford 2003-02-26 20:32:56 Can't update rows in tables qualified with schema names
Previous Message Barry Lind 2003-02-25 17:00:31 Re: Bug: getColumns returns bad data for numeric types in