X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 00D913A3FFA for ; Mon, 8 Nov 2004 08:59:08 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83915-08 for ; Mon, 8 Nov 2004 08:59:02 +0000 (GMT) Received: from smtp.lewczuk.com (118.224.149.195.tld.pl [195.149.224.118]) by svr1.postgresql.org (Postfix) with SMTP id 6C45F3A3FD7 for ; Mon, 8 Nov 2004 08:59:02 +0000 (GMT) Received: (qmail 29401 invoked by uid 700); 8 Nov 2004 08:58:58 -0000 Received: from linux.samar.pl (HELO ?192.168.1.17?) (marek@lewczuk.com@62.233.139.198) by 118.224.149.195.tld.pl with SMTP; 8 Nov 2004 08:58:58 -0000 Message-ID: <418F3554.8090209@lewczuk.com> Date: Mon, 08 Nov 2004 09:59:00 +0100 From: Marek Lewczuk User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lista dyskusyjna pgsql-general , Lista dyskusyjna pgsql-sql Subject: how to use COPY within plperl Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/319 X-Sequence-Number: 68399 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.