Skip site navigation (1) Skip section navigation (2)

COPY FROM stdin;

From: Chris Gamache <cgg007(at)yahoo(dot)com>
To: pgsql-odbc(at)postgresql(dot)org, pgman(at)candle(dot)pha(dot)pa(dot)us
Subject: COPY FROM stdin;
Date: 2002-10-08 14:07:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
I've posted in pgsql-general... I think the moment they read ODBC their eyes
glazed over. :) Perhaps y'all might have an idea for me.

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

Any hints?

Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More

In response to

pgsql-odbc by date

Next:From: valcauda St├ęphaneDate: 2002-10-08 17:17:38
Subject: ROWID ? or other internal ID
Previous:From: Dave PageDate: 2002-10-08 09:59:11
Subject: Re: Unix build

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group