Home Explore Blog CI



postgresql

42th chunk of `doc/src/sgml/ecpg.sgml`
de81c5e905c9b505fb0b0ec5c3fcbeec8d00016a5d090d220000000100000fa3
        arbitrary precision, converting a numeric variable into other types
        might cause underflow.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-num-divide-zero">
      <term><literal>PGTYPES_NUM_DIVIDE_ZERO</literal></term>
      <listitem>
       <para>
        A division by zero has been attempted.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-date-bad-date">
      <term><literal>PGTYPES_DATE_BAD_DATE</literal></term>
      <listitem>
       <para>
        An invalid date string was passed to
        the <function>PGTYPESdate_from_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-date-err-eargs">
      <term><literal>PGTYPES_DATE_ERR_EARGS</literal></term>
      <listitem>
       <para>
        Invalid arguments were passed to the
        <function>PGTYPESdate_defmt_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-date-err-enoshortdate">
      <term><literal>PGTYPES_DATE_ERR_ENOSHORTDATE</literal></term>
      <listitem>
       <para>
        An invalid token in the input string was found by the
        <function>PGTYPESdate_defmt_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-intvl-bad-interval">
      <term><literal>PGTYPES_INTVL_BAD_INTERVAL</literal></term>
      <listitem>
       <para>
        An invalid interval string was passed to the
        <function>PGTYPESinterval_from_asc</function> function, or an
        invalid interval value was passed to the
        <function>PGTYPESinterval_to_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-date-err-enotdmy">
      <term><literal>PGTYPES_DATE_ERR_ENOTDMY</literal></term>
      <listitem>
       <para>
        There was a mismatch in the day/month/year assignment in the
        <function>PGTYPESdate_defmt_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-date-bad-day">
      <term><literal>PGTYPES_DATE_BAD_DAY</literal></term>
      <listitem>
       <para>
        An invalid day of the month value was found by
        the <function>PGTYPESdate_defmt_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-date-bad-month">
      <term><literal>PGTYPES_DATE_BAD_MONTH</literal></term>
      <listitem>
       <para>
        An invalid month value was found by
        the <function>PGTYPESdate_defmt_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-ts-bad-timestamp">
      <term><literal>PGTYPES_TS_BAD_TIMESTAMP</literal></term>
      <listitem>
       <para>
        An invalid timestamp string pass passed to
        the <function>PGTYPEStimestamp_from_asc</function> function,
        or an invalid timestamp value was passed to
        the <function>PGTYPEStimestamp_to_asc</function> function.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry id="ecpg-pgtypes-errno-pgtypes-ts-err-einftime">
      <term><literal>PGTYPES_TS_ERR_EINFTIME</literal></term>
      <listitem>
       <para>
        An infinite timestamp value was encountered in a context that
        cannot handle it.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </para>
  </sect2>

   <sect2 id="ecpg-pgtypes-constants">
    <title>Special Constants of pgtypeslib</title>
   <para>
    <variablelist>
     <varlistentry id="pgtypesinvalidtimestamp">
      <term><literal>PGTYPESInvalidTimestamp</literal></term>
      <listitem>
       <para>
        A value of type timestamp representing an invalid

Title: pgtypeslib Error Codes Related to Date, Interval, and Timestamp Parsing
Summary
This section details more error codes specific to the `pgtypeslib` library. It covers errors encountered when parsing date strings (`PGTYPES_DATE_BAD_DATE`, `PGTYPES_DATE_ERR_EARGS`, `PGTYPES_DATE_ERR_ENOSHORTDATE`, `PGTYPES_DATE_ERR_ENOTDMY`, `PGTYPES_DATE_BAD_DAY`, `PGTYPES_DATE_BAD_MONTH`), interval strings (`PGTYPES_INTVL_BAD_INTERVAL`), and timestamp strings (`PGTYPES_TS_BAD_TIMESTAMP`, `PGTYPES_TS_ERR_EINFTIME`). These errors occur when the input string format is invalid or the resulting value is outside the acceptable range.