There is an file-fdw example that reads the server config file, so cross
link them.
Reported-by: Oleg Samoilov
Discussion: https://postgr.es/m/
159800192078.2886.
10431506404995508950@wrigleys.postgresql.org
Backpatch-through: 9.5
<programlisting>
COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
</programlisting>
+ It is also possible to access the file as a foreign table, using
+ the supplied <xref linkend="file-fdw"/> module.
</para>
<para>
<para>
One of the obvious uses for <literal>file_fdw</literal> is to make
the PostgreSQL activity log available as a table for querying. To
- do this, first you must be logging to a CSV file, which here we
+ do this, first you must be <link
+ linkend="runtime-config-logging-csvlog">logging to a CSV file,</link>
+ which here we
will call <literal>pglog.csv</literal>. First, install <literal>file_fdw</literal>
as an extension:
</para>