how to use COPY within plperl - Mailing list pgsql-general

From Marek Lewczuk
Subject how to use COPY within plperl
Date
Msg-id 418F3554.8090209@lewczuk.com
Whole thread Raw
List pgsql-general
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.



pgsql-general by date:

Previous
From: Johan Wehtje
Date:
Subject: Re: Visual DATA MODEL Designer in linux?
Next
From: "Markus Wollny"
Date:
Subject: Re: Can this be indexed?