Re: COPY command question

From: Kedar <kedarr(at)netcore(dot)co(dot)in>
To: Sam Mason <sam(at)samason(dot)me(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY command question
Date: 2009-02-11 18:52:55
Message-ID: 49931E87.4060707@netcore.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Yes should work perfectly as suggested by Sam,

chk this for jdbc support:
http://kato.iki.fi/sw/db/postgresql/jdbc/copy/

Sam Mason wrote:

>On Wed, Feb 11, 2009 at 10:22:23AM -0800, Sharmila Jothirajah wrote:
>
>
>>I want to migrate my tables from Oracle to Postgres.
>>The COPY FROM command can take input from 'file' or 'STDIN'.
>>Is it possible for the COPY command to take its input from a
>>java program(which contains the oracle resultset) or any other way?
>>
>>
>
>"STDIN" just means from the same place as the rest of the SQL has come
>from. For example, if you're using JDBC, it would be possible do
>generate a string containing:
>
> COPY tbl (col1,col2) FROM STDIN WITH CSV;
> 1,2
> 4,7
> 12,37
> \.
>
>and execute() the whole string. There appear to be patches[1] available so
>you can stream directly into the database rather than having to generate
>a large strings to pass in.
>
>
>

--
Thanks & Regards

Kedar Parikh
Netcore Solutions Pvt. Ltd.

Tel: +91 (22) 6662 8135
Mob: +91 9819634734
Email: kedar(at)netcore(dot)co(dot)in
Web: www.netcore.co.in

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-02-11 18:53:18 Re: Saber cuando se dispara el trigger (After: insert,update,delete)
Previous Message Tom Lane 2009-02-11 18:50:41 Re: postmaster LISTENing on UDP port 32938