COPY question

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: COPY question
Date: 2010-10-21 21:16:04
Message-ID: AANLkTi=JkFKFp=_2rrgXh-Rw1J55hBTptvx7qjwJUj6M@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I still get the same error while using COPY FROM 'file'. I have to pass the
full directory for this to work, example:

COPY first (a,b,c) FROM '1st_file.csv' with csv header delimiter ',';
ERROR: could not open file "1st_file.csv" for reading: No such file or
directory

The same when I use: '.1st_file.csv' or './1st_file.csv'.

No errors when I give the full path.

Giving the full path is stupid, how can I use just the file name?

[PostgreSQL 9.1alpha1 on x86_64-unknown-linux-gnu, compiled by GCC gcc
(Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5, 64-bit]

regards
Szymon

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2010-10-21 21:28:23 Re: COPY question
Previous Message Dmitriy Igrishin 2010-10-21 20:21:17 Re: Advice needed on application/database authentication/authorization/auditing model