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-20 18:47:48
Message-ID: 87r4not8ku.fsf@macbeth.sac.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

I should also note that I want to run a series of these commands, hence
setting pwd once and then wanting to use it multiple times.

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 Matthew Vernon 2012-11-20 18:55:52 Re: COPY FROM in psql
Previous Message Matthew Vernon 2012-11-20 18:46:13 COPY FROM in psql