pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Goutam Paruchuri <gparuchuri@oneil.com>
To: Marek Lewczuk <newsy@lewczuk.com>
To: Lista dyskusyjna pgsql-general <pgsql-general@postgresql.org>
To: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: how to use COPY within plperl
Date: Mon, 8 Nov 2004 14:04:00 -0500
Message-ID: <B2C547DF42419645804F05B54290755ADC7C9A@DAYTONEX.oneilinc.net> (raw)

Why can you not use simple insert statements (sql insert).
Copy is meant to transfer large amount of data from text files to
databases and vice versa.

- Goutam

 

> -----Original Message-----
> From: pgsql-general-owner@postgresql.org 
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Marek Lewczuk
> Sent: Monday, November 08, 2004 3:59 AM
> To: Lista dyskusyjna pgsql-general; Lista dyskusyjna pgsql-sql
> Subject: [GENERAL] 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 9: the planner will ignore your desire to choose an index 
> scan if your
>       joining column's datatypes do not match
> 


Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.




view thread (3+ messages)  latest in thread

Message-ID: <B2C547DF42419645804F05B54290755ADC7C9A@DAYTONEX.oneilinc.net>
Permalink:  ../B2C547DF42419645804F05B54290755ADC7C9A@DAYTONEX.oneilinc.net/
Also on:    postgresql.org/message-id/B2C547DF42419645804F05B54290755ADC7C9A@DAYTONEX.oneilinc.net

 · 

reply

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: gparuchuri@oneil.com, newsy@lewczuk.com, pgsql-general@postgresql.org
  Subject: Re: how to use COPY within plperl
  In-Reply-To: <B2C547DF42419645804F05B54290755ADC7C9A@DAYTONEX.oneilinc.net>

* 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