Re: Question about COPY command

From: "Josh Harrison" <joshques(at)gmail(dot)com>
To: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about COPY command
Date: 2009-01-08 14:45:40
Message-ID: 8d89ea1d0901080645j457f09b7qbefed17681d7607a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 8, 2009 at 8:52 AM, A. Kretschmer <
andreas(dot)kretschmer(at)schollglas(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-01-08 14:48:04 Re: RCA for MemoryContextAlloc: invalid request size(Known Issue)
Previous Message Raymond O'Donnell 2009-01-08 13:54:30 Re: Question about COPY command