Re: Question about COPY command - Mailing list pgsql-general

From Josh Harrison
Subject Re: Question about COPY command
Date
Msg-id 8d89ea1d0901080645j457f09b7qbefed17681d7607a@mail.gmail.com
Whole thread Raw
In response to Re: Question about COPY command  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: Question about COPY command  (Andrej <andrej.groups@gmail.com>)
List pgsql-general


On Thu, Jan 8, 2009 at 8:52 AM, A. Kretschmer <andreas.kretschmer@schollglas.com> wrote:
In response to Josh Harrison :
> Hi,
> A basic question about the COPY command syntax....
> This is the syntax in the postgres manual.
>
> COPY tablename [ ( column [, ...] ) ]
>
>     FROM { 'filename' | STDIN }
> ......
> .....
>
> What is the difference between copying from 'filename' and copying from 'stdin' ???

Within psql, stdin is your keyboard. Otherwise, you can use COPY in a
UNIX-PIPE.
Thanks... Is it possible to use COPY command to copy data from oracle to postgresql database? I currently use jdbc to do this but its really slow...so I wanted to try the COPY command ?  So if i have to do  this using COPY command then I have to 'exp'  the oracle table to a flat file and read it using COPY command into postgresql tables ? Is there a way to do this without dumping the data into a file ?

My question is is it possible to read the oracle data from the oracle database and copy them into postgresql database directly by using COPY command instead of jdbc preparedstatement(INSERT command) ?

Thanks
Josh


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: "Gauthier, Dave"
Date:
Subject: selecting recs based on a tmp tbl vals that are wildcarded ?
Next
From: Tom Lane
Date:
Subject: Re: selecting recs based on a tmp tbl vals that are wildcarded ?