Home Explore Blog CI



postgresql

73th chunk of `doc/src/sgml/protocol.sgml`
3e9a8e21898a91491faaa66fa47fe20a86c29cf0034d52c80000000100000fa6
 <literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>,
      <literal>INFO</literal>, or <literal>LOG</literal> (in a notice message),
      or a localized translation of one of these.  Always present.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>V</literal></term>
    <listitem>
     <para>
      Severity: the field contents are
      <literal>ERROR</literal>, <literal>FATAL</literal>, or
      <literal>PANIC</literal> (in an error message), or
      <literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>,
      <literal>INFO</literal>, or <literal>LOG</literal> (in a notice message).
      This is identical to the <literal>S</literal> field except
      that the contents are never localized.  This is present only in
      messages generated by <productname>PostgreSQL</productname> versions 9.6
      and later.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>C</literal></term>
    <listitem>
     <para>
      Code: the SQLSTATE code for the error (see <xref
      linkend="errcodes-appendix"/>).  Not localizable.  Always present.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>M</literal></term>
    <listitem>
     <para>
      Message: the primary human-readable error message.
      This should be accurate but terse (typically one line).
      Always present.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>D</literal></term>
    <listitem>
     <para>
      Detail: an optional secondary error message carrying more
      detail about the problem.  Might run to multiple lines.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>H</literal></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>
    <term><literal>P</literal></term>
    <listitem>
     <para>
      Position: the field value is a decimal ASCII integer, indicating
      an error cursor position as an index into the original query string.
      The first character has index 1, and positions are measured in
      characters not bytes.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>p</literal></term>
    <listitem>
     <para>
      Internal position: this is defined the same as the <literal>P</literal>
      field, but it is used when the cursor position refers to an internally
      generated command rather than the one submitted by the client.
      The <literal>q</literal> field will always appear when this field appears.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>q</literal></term>
    <listitem>
     <para>
      Internal query: 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>
    <term><literal>W</literal></term>
    <listitem>
     <para>
      Where: 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>
    <term><literal>s</literal></term>
    <listitem>
     <para>
      Schema name: if the error was associated with a specific database
      object, the name of the schema containing that object, if any.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry>
    <term><literal>t</literal></term>
    <listitem>
     <para>
      Table name: if the error was associated

Title: PostgreSQL Error and Notice Message Fields
Summary
This section describes the various fields that can appear in PostgreSQL ErrorResponse and NoticeResponse messages, including Severity, Code, Message, Detail, Hint, Position, and others, which provide information about the error or notice, such as its severity, cause, and context.