pg_read_file

HI

How do I read a file that resides in windows in c:\temp\sample.txt

I have tried
SELECT CAST(pg_read_file('c:\\temp\\sample.txt',0, 100000000) AS TEXT);
and got
ERROR: absolute path not allowed
SQL state: 42501

LVL 19
elimesikaAsked:
Who is Participating?
 
gheistConnect With a Mentor Commented:
http://www.postgresql.org/docs/8.3/static/errcodes-appendix.html
INSUFFICIENT PRIVILEGE

grant execute on procedure?
0
 
elimesikaAuthor Commented:
HI gheist

no, I don't think there is a grant problem since I am logging in as an administrator and pg_read_file is a built-in function , I believe that my PATH format is wrong , can you look at it please ?
0
 
elimesikaAuthor Commented:
The problem is not in the privileges.  
0
 
gheistCommented:
The file access of unix tools on windows is always a mystery and guesswork (and sometimes even with microsoft tools)
e.g cygwin or srvany.exe/instsrv.exe from M$
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.