Re: COPY FROM in psql - Mailing list pgsql-general

From Matthew Vernon
Subject Re: COPY FROM in psql
Date
Msg-id 87lidwt87f.fsf@macbeth.sac.ac.uk
Whole thread Raw
In response to COPY FROM in psql  (Matthew Vernon <matthew.vernon@sac.ac.uk>)
List pgsql-general
Matthew Vernon <matthew.vernon@sac.ac.uk> writes:

> naiively, you might try:
> \set pwd '\'' `pwd` '\''
> COPY table FROM :pwd || '/relative/path/to/data' ;

so I could do:

\set path '\'' `pwd` '/path/to/data1' '\''
COPY table1 FROM :path;

\set path '\'' `pwd` '/path/to/data2' '\''
COPY table2 FROM :path;

...but surely there's a better way?

Matthew

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


pgsql-general by date:

Previous
From: Thomas
Date:
Subject: Re: Experiences with pl/Java
Next
From: Dmitry Koterov
Date:
Subject: Simple queries slowdown, maybe related to 3-minute long " in transaction"?