From: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com>, PostgreSql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Foreign Data Wrapper for filesystem |
Date: | 2017-02-15 16:27:35 |
Message-ID: | CAAJSdjjVHDa0HrJcQhRAtS6EfBCU4Edb56B-6UBs6t3A94T4tw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Feb 15, 2017 at 10:20 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "=?UTF-8?Q?Leonardo_M._Ram=c3=a9?=" <l(dot)rame(at)griensu(dot)com> writes:
> > Hi, I'm looking for a FDW that allows listing a directory as a database
> > table allowing me to check if file exists, does anyonke know if such FDW
> > exists?.
>
> Why not use pg_ls_dir()? An FDW would be mighty awkward to use for this
> purpose, even if one existed.
>
It cannot be used for an arbitrary directory:
" Only files within the database cluster directory and the log_directory can
be accessed. "
ref: https://www.postgresql.org/docs/current/static/functions-admin.html
>
> regards, tom lane
>
Personally, I don't know what use such a function would be. It would be
executed on the _SERVER_, not the client. And that is probably why the
pg_ls_dir() is restricted. If it weren't it could be a security (or
privacy) violation.
--
"Irrigation of the land with seawater desalinated by fusion power is
ancient. It's called 'rain'." -- Michael McClary, in alt.fusion
Maranatha! <><
John McKown
From | Date | Subject | |
---|---|---|---|
Next Message | Leonardo M. Ramé | 2017-02-15 16:32:06 | Re: Foreign Data Wrapper for filesystem |
Previous Message | Tom Lane | 2017-02-15 16:20:05 | Re: Foreign Data Wrapper for filesystem |