Home Explore Blog CI



postgresql

61th chunk of `doc/src/sgml/ecpg.sgml`
4dacb2e940582d2aed29f46b5de4e425abf66689b908d8a00000000100000fa5
 <term>-204 (<symbol>ECPG_INT_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>int</type> and the datum in
       the database is of a different type and contains a value that
       cannot be interpreted as an <type>int</type>.  The library uses
       <function>strtol()</function> for this conversion.  (SQLSTATE
       42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-uint-format">
     <term>-205 (<symbol>ECPG_UINT_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>unsigned int</type> and the
       datum in the database is of a different type and contains a
       value that cannot be interpreted as an <type>unsigned
       int</type>.  The library uses <function>strtoul()</function>
       for this conversion.  (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-float-format">
     <term>-206 (<symbol>ECPG_FLOAT_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>float</type> and the datum
       in the database is of another type and contains a value that
       cannot be interpreted as a <type>float</type>.  The library
       uses <function>strtod()</function> for this conversion.
       (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-numeric-format">
     <term>-207 (<symbol>ECPG_NUMERIC_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>numeric</type> and the datum
       in the database is of another type and contains a value that
       cannot be interpreted as a <type>numeric</type> value.
       (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-interval-format">
     <term>-208 (<symbol>ECPG_INTERVAL_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>interval</type> and the datum
       in the database is of another type and contains a value that
       cannot be interpreted as an <type>interval</type> value.
       (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-date-format">
     <term>-209 (<symbol>ECPG_DATE_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>date</type> and the datum in
       the database is of another type and contains a value that
       cannot be interpreted as a <type>date</type> value.
       (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-timestamp-format">
     <term>-210 (<symbol>ECPG_TIMESTAMP_FORMAT</symbol>)</term>
     <listitem>
      <para>
       The host variable is of type <type>timestamp</type> and the
       datum in the database is of another type and contains a value
       that cannot be interpreted as a <type>timestamp</type> value.
       (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-convert-bool">
     <term>-211 (<symbol>ECPG_CONVERT_BOOL</symbol>)</term>
     <listitem>
      <para>
       This means the host variable is of type <type>bool</type> and
       the datum in the database is neither <literal>'t'</literal> nor
       <literal>'f'</literal>.  (SQLSTATE 42804)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry id="ecpg-sqlstate-sqlcode-ecpg-empty">
     <term>-212 (<symbol>ECPG_EMPTY</symbol>)</term>
     <listitem>
      <para>
       The statement sent to the <productname>PostgreSQL</productname>
       server was empty.  (This cannot normally happen in an embedded
       SQL program, so it might point to an internal error.)  (SQLSTATE
       YE002)
      </para>
     </listitem>
    </varlistentry>

    <varlistentry

Title: SQLCODE Values for Data Conversion Errors
Summary
This section details SQLCODE values related to data conversion errors between host variables and database values. It covers errors for int (ECPG_INT_FORMAT -204), unsigned int (ECPG_UINT_FORMAT -205), float (ECPG_FLOAT_FORMAT -206), numeric (ECPG_NUMERIC_FORMAT -207), interval (ECPG_INTERVAL_FORMAT -208), date (ECPG_DATE_FORMAT -209), timestamp (ECPG_TIMESTAMP_FORMAT -210), and boolean (ECPG_CONVERT_BOOL -211) types. It also mentions ECPG_EMPTY (-212), which indicates an empty statement sent to the PostgreSQL server, suggesting a possible internal error. All conversion errors result in SQLSTATE 42804, while ECPG_EMPTY results in SQLSTATE YE002.