Thread: COPY command

COPY command

From
Sanjay Manandhar
Date:
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!

I'm using a very standard build for Solaris.

Where is COPY?

thanks,

sanjay



Re: COPY command

From
Rajesh Kumar Mallah
Date:


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
>
>