* Guoping Zhang:

> Thanks for pointing me the cause, but we simply cannot use the COPY FROM
> solution.

Why not?  Just do something like this:

CREATE TEMPORARY TABLE tmp (col1 TEXT NOT NULL, col2 INTEGER NOT NULL);
COPY tmp FROM STDIN;
row1    1
row2    2
...
\.
INSERT INTO target SELECT * FROM tmp;

If you need some kind of SELECT/INSERT/UPDATE cycle, it's far more
complex, of course, and I'm not quite happy with what I'm using right
now.

-- 
Florian Weimer                <[EMAIL PROTECTED]>
BFK edv-consulting GmbH       http://www.bfk.de/
Durlacher Allee 47            tel: +49-721-96201-1
D-76131 Karlsruhe             fax: +49-721-96201-99

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to