Re: Permission denied in file_fdw (Windows)

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: Stefan Keller <sfkeller(at)gmail(dot)com>
Cc: pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Permission denied in file_fdw (Windows)
Date: 2012-12-04 23:48:39
Message-ID: 50BE8BD7.6050703@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/12/2012 23:39, Stefan Keller wrote:
> Hi
>
> I'm getting an error when reading from a file_fdw table in a Windows
> environment.
> Any hints? (see below).
>
> And http://www.postgresql.org/docs/9.1/static/file-fdw.html is not
> really verbose :->
> At least following format options should be mentioned: 'xml', 'text',
> 'csv', 'binary'.
>
> Yours, Stefan
>
>
> That's what I'm doing:
>
> CREATE EXTENSION file_fdw;
>
> CREATE SERVER file_server FOREIGN DATA WRAPPER file_fdw;
>
> CREATE FOREIGN TABLE foreignfiletable(id text, title text)
> SERVER file_server
> OPTIONS(format 'csv', header 'true', filename
> 'C:/Users/someuser/Downloads/file.csv', delimiter '|', null '');
>
> SELECT * FROM foreignfiletable;
> -- ERROR: file »C:/Users/someuser/Downloads/file.csv« could not be
> opened for reading: Permission denied.

Have you checked that the user account under which the server is running
has the necessary permissions to read that file? - That's what the error
message would seem to indicate.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2012-12-04 23:56:10 Re: Permission denied in file_fdw (Windows)
Previous Message Stefan Keller 2012-12-04 23:39:06 Permission denied in file_fdw (Windows)