Search Postgresql Archives

Re: COPY FROM in psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2012-11-21, Matthew Vernon <matthew.vernon@xxxxxxxxx> wrote:
> tgl@xxxxxxxxxxxxx (Tom Lane) writes:
>
>> Matthew Vernon <matthew.vernon@xxxxxxxxx> writes:
>>> naiively, you might try:
>>> \set pwd '\'' `pwd` '\''
>>> COPY table FROM :pwd || '/relative/path/to/data' ;
>>
>> Umm ... why don't you just use a relative path as-is, with \copy
>> instead of COPY?
>
> Thanks for the suggestion, but I was avoiding \copy because the
> quantities of data involved are large, and the documentation suggests
> that COPY is better than \copy for large data volumes.

\copy  is translated to "COPY .... FROM STDIN"  by psql
performance should be almost as fast, you loose a little in the 
buffering and re-streaming, but not much.

-- 
⚂⚃ 100% natural



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux