how to use COPY within plperl

Hello,
I need to use COPY (instead of INSERT) within plperl function. I know
that COPY will work if data will be taken from file - however I need to
use STDIN. I tried this:
spi_exec_query("COPY sometable (field1, field2) FROM
stdin;"."\n"."sometext"."\t"."sometext"."\n"."\.")

But it didn't work. Thanks in advance.



---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo [at] postgresql.org
newsy [ Mo, 08 November 2004 09:59 ] [ ID #471478 ]
Datenbanken » comp.databases.postgresql.sql » how to use COPY within plperl

Vorheriges Thema: Re: Scheduling Jobs In PostgreSQL
Nächstes Thema: Re: Scheduling Jobs In PostgreSQL