file_fdw vs relative paths

Magnus Hagander <magnus@hagander.net>

From: Magnus Hagander <magnus@hagander.net>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-07-15T11:22:21Z
Lists: pgsql-hackers
According to the documentation, the filename given in file_fdw must be an
absolute path. Hwever, it works perfectly fine with a relative path.

So either the documentation is wrong, or the code is wrong. It behaves the
same at least back to 9.5, I did not try it further back than that.

I can't find a reference to the code that limits this. AFAICT the
documentation has been there since day 1.

Question is, which one is right. Is there a reason we'd want to restrict it
to absolute pathnames?

-- 
 Magnus Hagander
 Me: https://www.hagander.net/ <http://www.hagander.net/>
 Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

Commits

  1. Change path in example of file_fdw for logs

  2. Fix docs bug stating file_fdw requires absolute paths

  3. Add contrib/file_fdw foreign-data wrapper for reading files via COPY.