Re: COPY keyword

From: Jeff Eckermann <jeff_eckermann(at)yahoo(dot)com>
To: Peeter Sekavin <prs(at)hot(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY keyword
Date: 2003-06-23 14:40:01
Message-ID: 20030623144001.57852.qmail@web20807.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Peeter,

I do not know Java, so I cannot suggest the syntax to
use. I am not sure that COPY is the best solution for
your needs anyway. Have you tried running your
multiple inserts within a single transaction?

I am forwarding your message to the pgsql-general list
so that others can comment.

--- Peeter Sekavin <prs(at)hot(dot)ee> wrote:
> Hi!
>
> I'am a developer of the java application. I need to
> insert multiple rows
> into one table and it takes a lot of time to use
> multiple INSERT-s. How
> could I use COPY keyword to insert data into TABLE?
> I'm not reading data
> from file, but it is fetched from database,
> processed and inserted into
> another table, so I want to copy from stdin. Code
> like this
> Statement stmnt = con.createStatement();
> stmnt.executeUpdate("COPY \"LOG\" FROM stdin");
> System.out.println("112122 'fasdfsadfsadf'");
> System.out.println("\\.");
>
> throws an error
>
> Peeter Sekavin
> prs(at)hot(dot)ee
> programmer
>

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-06-23 14:52:23 Re: A creepy story about dates. How to prevent it?
Previous Message Johnson, Shaunn 2003-06-23 14:24:14 missing chunk number error?