ERROR: relative path not allowed for COPY to file

From: Andrew Taylor <andydtaylor(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: ERROR: relative path not allowed for COPY to file
Date: 2013-02-12 17:19:41
Message-ID: CAFAE3JxDj41-GM0_kMmdwp1AjE282jBGqZqudhp74+O9XDuPkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I must be being thick - can anyone tell me what I'm doing wrong?

postgres=# COPY post_e_n
postgres-# TO 'usr/local/psql/csv/post_e_n.csv'
postgres-# WITH DELIMITER ','
postgres-# CSV HEADER;
ERROR: relative path not allowed for COPY to file

COPY (SELECT * FROM post_e_n) gave me the same error.

I did chmod 755 -R psql to make sure the directory could be written to. Is
this to do with the underscores? There is no csv file pre-existing in the
directory.

Thanks,

Andy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-02-12 17:31:07 Re: ERROR: relative path not allowed for COPY to file
Previous Message Magnus Hagander 2013-02-12 17:13:33 Re: Changing Character Sets