linkend="guc-application-name"/> for details.
</para>
<para>
<literal>%</literal> characters begin <quote>escape sequences</quote>
that are replaced with status information as outlined below.
Unrecognized escapes are ignored. Other characters are copied straight
to the application name. Note that it's not allowed to specify a
plus/minus sign or a numeric literal after the <literal>%</literal>
and before the option, for alignment and padding.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Escape</entry>
<entry>Effect</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>%a</literal></entry>
<entry>Application name on local server</entry>
</row>
<row>
<entry><literal>%c</literal></entry>
<entry>
Session ID on local server
(see <xref linkend="guc-log-line-prefix"/> for details)
</entry>
</row>
<row>
<entry><literal>%C</literal></entry>
<entry>
Cluster name on local server
(see <xref linkend="guc-cluster-name"/> for details)
</entry>
</row>
<row>
<entry><literal>%u</literal></entry>
<entry>User name on local server</entry>
</row>
<row>
<entry><literal>%d</literal></entry>
<entry>Database name on local server</entry>
</row>
<row>
<entry><literal>%p</literal></entry>
<entry>Process ID of backend on local server</entry>
</row>
<row>
<entry><literal>%%</literal></entry>
<entry>Literal %</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
For example, suppose user <literal>local_user</literal> establishes
a connection from database <literal>local_db</literal> to
<literal>foreign_db</literal> as user <literal>foreign_user</literal>,
the setting <literal>'db=%d, user=%u'</literal> is replaced with
<literal>'db=local_db, user=local_user'</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
<sect2 id="postgres-fdw-examples">
<title>Examples</title>
<para>
Here