Thread: Inserting large queries

Inserting large queries

From
"Kevin Schroeder"
Date:
Hello,
    I'm not quite sure if this is the proper place to post this question,
but since my problem deals with Java and PostgreSQL I figured it would be
close.

    I'm trying to do a large insert ( ~15MB) and I keep running out of
memory in my Java program when I try to do an insert through the JDBC
interface.  So I decided to try to create my insert in a file (using tab
delimiters) and use the COPY command.  However, I noticed that I can't
specify column headers when I do it that way.  That wouldn't be a problem
except that one of my columns is a primary key and needs to be
autogenerated.  How do I go about inserting my data without the primary key
header in a COPY file?

Thanks,
Kevin