Search Postgresql Archives

Re: COPY FROM in psql

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

 



On 11/20/2012 11:47 AM, Matthew Vernon wrote:
Matthew Vernon <matthew.vernon@xxxxxxxxx> 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

Since you're resting the full path anyway, does this work?

\set pwd '\'' `pwd` '/rest/of/path\''


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