Escape char in pg_ls_dir

From: lgcaracol <david(dot)m(dot)colaco(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Escape char in pg_ls_dir
Date: 2017-12-29 10:00:56
Message-ID: 1514541656508-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I'm new to postgresql. I have a database running on a windows machine and I
need to use pg_ls_dir to list the contents of a folder, but I can't because
of the backslash (\), as it's not allowed.
If I run select pg_ls_dir('c:') I can see the listing of C:\, but I need to
check another folder.
If I run select pg_ls_dir(E'c:\inetpub'), I got an error "could not open
directory "c:inetpub": No such file or directory. So I now the \ is not
being used.
If I run select pg_ls_dir('c:\\inetpub'), it says "absolute path not
allowed".

Anyone can give me a hint of how can I do this?

Thanks

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-novice-f2132464.html

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2017-12-29 15:45:17 Re: Escape char in pg_ls_dir
Previous Message David G. Johnston 2017-12-28 20:15:52 Re: How to define fixed validation tables