pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Gamache <cgg007@yahoo.com>
To: pgsql-odbc@postgresql.org
To: pgman@candle.pha.pa.us
Subject: COPY FROM stdin;
Date: Tue, 8 Oct 2002 07:07:35 -0700 (PDT)
Message-ID: <20021008140735.90716.qmail@web13807.mail.yahoo.com> (raw)
In-Reply-To: <NEBBKKMDEMECHALFPAIIIELOCPAA.alan@graphicsuniversal.com>

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
tuples.

Any hints?




__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com



view thread (2+ messages)  latest in thread

Message-ID: <20021008140735.90716.qmail@web13807.mail.yahoo.com>
Permalink:  ../20021008140735.90716.qmail@web13807.mail.yahoo.com/
Also on:    postgresql.org/message-id/20021008140735.90716.qmail@web13807.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: cgg007@yahoo.com, pgman@candle.pha.pa.us
  Subject: Re: COPY FROM stdin;
  In-Reply-To: <20021008140735.90716.qmail@web13807.mail.yahoo.com>
  References: <NEBBKKMDEMECHALFPAIIIELOCPAA.alan@graphicsuniversal.com> <20021008140735.90716.qmail@web13807.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox