COPY FROM stdin;

From: Chris Gamache <cgg007(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: COPY FROM stdin;
Date: 2002-10-03 17:56:05
Message-ID: 20021003175605.11710.qmail@web13804.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm tring to send a chunk of data to the postgresql backend via ODBC...

Here's a table:
CREATE TABLE testtable (
value1 int4,
value2 varchar(10)) WITH OIDS;

I'm trying to execute this a query with this intent...

"COPY testtable FROM stdin USING DELIMITERS '|';" + chr(10) +
"1|Test1" + chr(10) +
"2|Test2" + chr(10) +
"3|Test3" + chr(10) +
"4|Test4" + chr(10) +
"\." + chr(10)

Of course, this SQL statement does not work... :) I have no idea how to harness
the power of COPY without creating a file on the machine's filesystem for it to
read from, or piping the data into psql from the command line. INSERTS of the
same data go at about 1-2 per second. That gets costly if I'm doing 5000
tuples.

Any hints?

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

Browse pgsql-general by date

  From Date Subject
Next Message Adrian 'Dagurashibanipal' von Bidder 2002-10-03 17:58:48 Re: Oracle beats up on Open Source Database(s) ... and
Previous Message Thomas Pfau 2002-10-03 17:40:30 Re: schemas in 7.3b1