Re: COPY command - Mailing list pgsql-general

From Rajesh Kumar Mallah
Subject Re: COPY command
Date
Msg-id 3F29E656.2060202@trade-india.com
Whole thread Raw
In response to COPY command  (Sanjay Manandhar <sanjay@bwh.harvard.edu>)
List 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@postgresql.org
>
>



pgsql-general by date:

Previous
From: "Claudio Lapidus"
Date:
Subject: Re: Comments in .sql files
Next
From: Dennis Gearon
Date:
Subject: Re: Table Stats