From: Marek Lewczuk <newsy@lewczuk.com>
To: Lista dyskusyjna pgsql-general <pgsql-general@postgresql.org>
To: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: how to use COPY within plperl
Date: Mon, 08 Nov 2004 09:59:00 +0100
Message-ID: <418F3554.8090209@lewczuk.com> (raw)
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: newsy@lewczuk.com, pgsql-general@postgresql.org
Subject: Re: how to use COPY within plperl
In-Reply-To: <418F3554.8090209@lewczuk.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox