Re: COPY FROM in psql

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: COPY FROM in psql
Дата
Msg-id k8nhq1$3oa$2@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на COPY FROM in psql  (Matthew Vernon <matthew.vernon@sac.ac.uk>)
Список pgsql-general
On 2012-11-21, Matthew Vernon <matthew.vernon@sac.ac.uk> wrote:
> tgl@sss.pgh.pa.us (Tom Lane) writes:
>
>> Matthew Vernon <matthew.vernon@sac.ac.uk> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Kroon
Дата:
Сообщение: Re: create table in memory
Следующее
От: Peter Kroon
Дата:
Сообщение: ERROR: query has no destination for result data