Re: Performance penalty for remote access of postgresql (8.1.3)? any experiance?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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                <fweimer@xxxxxx>
BFK edv-consulting GmbH       http://www.bfk.de/
Durlacher Allee 47            tel: +49-721-96201-1
D-76131 Karlsruhe             fax: +49-721-96201-99


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux