Re: COPY FROM in psql

From: Matthew Vernon <matthew(dot)vernon(at)sac(dot)ac(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: COPY FROM in psql
Date: 2012-11-21 10:00:34
Message-ID: 877gpftgw2.fsf@macbeth.sac.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) writes:

> Matthew Vernon <matthew(dot)vernon(at)sac(dot)ac(dot)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.

Thanks,

Matthew

--
Matthew Vernon
Quantitative Veterinary Epidemiologist
Epidemiology Research Unit, SAC Inverness

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2012-11-21 10:21:37 Re: PostgreSQL training recommendations?
Previous Message Jasen Betts 2012-11-21 09:49:42 Re: PostgreSQL training recommendations?