<varlistentry id="libpq-pg-diag-message-detail">
<term><symbol>PG_DIAG_MESSAGE_DETAIL</symbol></term>
<listitem>
<para>
Detail: an optional secondary error message carrying more
detail about the problem. Might run to multiple lines.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-message-hint">
<term><symbol>PG_DIAG_MESSAGE_HINT</symbol></term>
<listitem>
<para>
Hint: an optional suggestion what to do about the problem.
This is intended to differ from detail in that it offers advice
(potentially inappropriate) rather than hard facts. Might
run to multiple lines.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-statement-position">
<term><symbol>PG_DIAG_STATEMENT_POSITION</symbol></term>
<listitem>
<para>
A string containing a decimal integer indicating an error cursor
position as an index into the original statement string. The
first character has index 1, and positions are measured in
characters not bytes.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-internal-position">
<term><symbol>PG_DIAG_INTERNAL_POSITION</symbol></term>
<listitem>
<para>
This is defined the same as the
<symbol>PG_DIAG_STATEMENT_POSITION</symbol> field, but it is used
when the cursor position refers to an internally generated
command rather than the one submitted by the client. The
<symbol>PG_DIAG_INTERNAL_QUERY</symbol> field will always appear when
this field appears.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-internal-query">
<term><symbol>PG_DIAG_INTERNAL_QUERY</symbol></term>
<listitem>
<para>
The text of a failed internally-generated command. This could
be, for example, an SQL query issued by a PL/pgSQL function.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-context">
<term><symbol>PG_DIAG_CONTEXT</symbol></term>
<listitem>
<para>
An indication of the context in which the error occurred.
Presently this includes a call stack traceback of active
procedural language functions and internally-generated queries.
The trace is one entry per line, most recent first.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-schema-name">
<term><symbol>PG_DIAG_SCHEMA_NAME</symbol></term>
<listitem>
<para>
If the error was associated with a specific database object,
the name of the schema containing that object, if any.
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-table-name">
<term><symbol>PG_DIAG_TABLE_NAME</symbol></term>
<listitem>
<para>
If the error was associated with a specific table, the name of the
table. (Refer to the schema name field for the name of the
table's schema.)
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-column-name">
<term><symbol>PG_DIAG_COLUMN_NAME</symbol></term>
<listitem>
<para>
If the error was associated with a specific table column, the name
of the column. (Refer to the schema and table name fields to
identify the table.)
</para>
</listitem>
</varlistentry>
<varlistentry id="libpq-pg-diag-datatype-name">