Tom Lane wrote:
Bruce Momjian <> writes:

Tom Lane wrote:

I wonder if we should take pg_read_file (and the rest of genfile.c)
back out of the backend and stick them into contrib/adminpack.

I thought about that but what we have in the backend now is read-only
which basically could be done using COPY, so I don't see any security
value to moving them out.  They are super-user only just like COPY.

The you-can-do-it-with-COPY argument doesn't apply to pg_ls_dir, nor to
pg_stat_file, and I find it unconvincing even for pg_read_file.  COPY
isn't at all friendly for trying to read binary files, for instance.

pg_file_read returns text which isn't binary-friendly either.


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to