Re: COPY command

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Sanjay Manandhar <sanjay(at)bwh(dot)harvard(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY command
Date: 2003-08-01 04:02:30
Message-ID: 3F29E656.2060202@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sanjay Manandhar wrote:

>Hi all,
>I've been using Postgres 7.3 quite nicely for a while, but now that I'm looking
>to ingest a large pool of data I was thinking of using the COPY command from
>Unix shell.
>
>And lo and behold! no COPY command!
>

COPY is not a unix command , its a PostgreSQL command
supposed to be given from the psql prompt.

for loading large files you can put the large file on the postgresql server
machine in some path. start psql in the same machine then issue

psql > COPY students from '/tmp/path/to/file.dat' ;

where student is the table u want to load. and /tmp/path/to/file.dat
is the actual file.

psql > \h COPY

will give u more info abt the copy command.

regds
mallah.

>
>I'm using a very standard build for Solaris.
>
>Where is COPY?
>
>thanks,
>
>sanjay
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-08-01 04:23:51 Re: Table Stats
Previous Message Claudio Lapidus 2003-08-01 03:54:11 Re: Comments in .sql files