From: Satoshi Nagayasu <satoshi.nagayasu@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-docs <pgsql-docs@postgresql.org>
Cc: Michael Meskes <meskes@postgresql.org>
Subject: Re: ECPG - Some errno definitions don't match to the manual
Date: Tue, 10 Aug 2010 12:29:45 +0900
Message-ID: <4C60C7A9.10307@gmail.com> (raw)
In-Reply-To: <4C602E9D.40501@gmail.com>
References: <4C4847D0.9030001@gmail.com>
<AANLkTin286hRE0oLZFr4quDp6esNNztHmYUhfLO0vf_4@mail.gmail.com>
<4C602E9D.40501@gmail.com>
On 2010/08/10 1:36, Satoshi Nagayasu wrote:
> On 2010/08/09 21:27, Robert Haas wrote:
>>> I'm now investigating SQLCODE and SQLSTATE, and I have found
>>> that some of the errno definitions don't match to the manual.
>
>>> What does it mean? The manual is not up to date?
>>
>> Yeah, I think that's what it means. Perhaps you could provide a patch
>> for the docs?
>
> Sure, I will make a patch for this. Please wait a moment.
A patch to fix this problem is attached.
Please take a look.
Regards,
--
NAGAYASU Satoshi <satoshi.nagayasu@gmail.com>
Attachments:ecpg.sgml.90b1.patch (text/plain, 8.8K) download
*** ecpg.sgml.orig 2010-05-13 09:55:05.000000000 +0900
--- ecpg.sgml 2010-08-10 12:21:42.000000000 +0900
***************
*** 4791,4796 ****
--- 4791,4816 ----
<variablelist>
<varlistentry>
+ <term>0 (<symbol>ECPG_NO_ERROR</symbol>)</term>+ <listitem>+ <para>+ (SQLSTATE 00000)+ </para>+ </listitem>+ </varlistentry>+ + <varlistentry>+ <term>100 (<symbol>ECPG_NOT_FOUND</symbol>)</term>+ <listitem>+ <para>+ This is a harmless condition indicating that the last command+ retrieved or processed zero rows, or that you are at the end of+ the cursor. (SQLSTATE 02000)+ </para>+ </listitem>+ </varlistentry>+ + <varlistentry>
<term>-12 (<symbol>ECPG_OUT_OF_MEMORY</symbol>)</term>
<listitem>
<para>
***************
*** 4883,4889 ****
</varlistentry>
<varlistentry>
! <term>-207 (<symbol>ECPG_CONVERT_BOOL</symbol>)</term>
<listitem>
<para>
This means the host variable is of type <type>bool</type> and
--- 4903,4957 ----
</varlistentry>
<varlistentry>
! <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>.
! (SQLSTATE 42804)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <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 a <type>interval</type>.
! (SQLSTATE 42804)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <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>.
! (SQLSTATE 42804)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <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>.
! (SQLSTATE 42804)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-211 (<symbol>ECPG_CONVERT_BOOL</symbol>)</term>
<listitem>
<para>
This means the host variable is of type <type>bool</type> and
***************
*** 4894,4900 ****
</varlistentry>
<varlistentry>
! <term>-208 (<symbol>ECPG_EMPTY</symbol>)</term>
<listitem>
<para>
The statement sent to the <productname>PostgreSQL</productname>
--- 4962,4968 ----
</varlistentry>
<varlistentry>
! <term>-212 (<symbol>ECPG_EMPTY</symbol>)</term>
<listitem>
<para>
The statement sent to the <productname>PostgreSQL</productname>
***************
*** 4906,4912 ****
</varlistentry>
<varlistentry>
! <term>-209 (<symbol>ECPG_MISSING_INDICATOR</symbol>)</term>
<listitem>
<para>
A null value was returned and no null indicator variable was
--- 4974,4980 ----
</varlistentry>
<varlistentry>
! <term>-213 (<symbol>ECPG_MISSING_INDICATOR</symbol>)</term>
<listitem>
<para>
A null value was returned and no null indicator variable was
***************
*** 4916,4922 ****
</varlistentry>
<varlistentry>
! <term>-210 (<symbol>ECPG_NO_ARRAY</symbol>)</term>
<listitem>
<para>
An ordinary variable was used in a place that requires an
--- 4984,4990 ----
</varlistentry>
<varlistentry>
! <term>-214 (<symbol>ECPG_NO_ARRAY</symbol>)</term>
<listitem>
<para>
An ordinary variable was used in a place that requires an
***************
*** 4926,4932 ****
</varlistentry>
<varlistentry>
! <term>-211 (<symbol>ECPG_DATA_NOT_ARRAY</symbol>)</term>
<listitem>
<para>
The database returned an ordinary variable in a place that
--- 4994,5000 ----
</varlistentry>
<varlistentry>
! <term>-215 (<symbol>ECPG_DATA_NOT_ARRAY</symbol>)</term>
<listitem>
<para>
The database returned an ordinary variable in a place that
***************
*** 4936,4941 ****
--- 5004,5021 ----
</varlistentry>
<varlistentry>
+ <term>-216 (<symbol>ECPG_ARRAY_INSERT</symbol>)</term>+ <listitem>+ <para>+ The value could not be inserted into the array.(This is+ disabled by <literal>#if 0</literal> in+ <command>ecpg</command>.)+ (SQLSTATE 42804)+ </para>+ </listitem>+ </varlistentry>+ + <varlistentry>
<term>-220 (<symbol>ECPG_NO_CONN</symbol>)</term>
<listitem>
<para>
***************
*** 4966,4971 ****
--- 5046,5063 ----
</varlistentry>
<varlistentry>
+ <term>-239 (<symbol>ECPG_INFORMIX_DUPLICATE_KEY</symbol>)</term>+ <listitem>+ <para>+ Duplicate key error, and a violation for the unique+ constraint (Informix compatible mode).+ (SQLSTATE 23505)+ + </para>+ </listitem>+ </varlistentry>+ + <varlistentry>
<term>-240 (<symbol>ECPG_UNKNOWN_DESCRIPTOR</symbol>)</term>
<listitem>
<para>
***************
*** 5018,5023 ****
--- 5110,5125 ----
</varlistentry>
<varlistentry>
+ <term>-284 (<symbol>ECPG_INFORMIX_SUBSELECT_NOT_ONE</symbol>)</term>+ <listitem>+ <para>+ A result of the subquery is not single row (Informix compatibie mode).+ (SQLSTATE 21000)+ </para>+ </listitem>+ </varlistentry>+ + <varlistentry>
<term>-400 (<symbol>ECPG_PGSQL</symbol>)</term>
<listitem>
<para>
***************
*** 5050,5064 ****
</varlistentry>
<varlistentry>
! <term>100 (<symbol>ECPG_NOT_FOUND</symbol>)</term>
<listitem>
<para>
! This is a harmless condition indicating that the last command
! retrieved or processed zero rows, or that you are at the end of
! the cursor. (SQLSTATE 02000)
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</sect2>
--- 5152,5231 ----
</varlistentry>
<varlistentry>
! <term>-403 (<symbol>ECPG_DUPLICATE_KEY</symbol>)</term>
<listitem>
<para>
! Duplicate key error, and a violation for the unique
! constraint.
! (SQLSTATE 23505)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-404 (<symbol>ECPG_SUBSELECT_NOT_ONE</symbol>)</term>
! <listitem>
! <para>
! A result for the subquery is not single row. (SQLSTATE 21000)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-600 (<symbol>ECPG_WARNING_UNRECOGNIZED</symbol>)</term>
! <listitem>
! <para>
! A query is ignored by the END.
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-601 (<symbol>ECPG_WARNING_QUERY_IGNORED</symbol>)</term>
! <listitem>
! <para>
! Current transaction is aborted. Query is ignored by end of the
! transaction block.
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-602 (<symbol>ECPG_WARNING_UNKNOWN_PORTAL</symbol>)</term>
! <listitem>
! <para>
! Invalid cursor name is given. (SQLSTATE 34000)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-603 (<symbol>ECPG_WARNING_IN_TRANSACTION</symbol>)</term>
! <listitem>
! <para>
! Transaction is in progress. (SQLSTATE 25001)
! </para>
! </listitem>
! </varlistentry>
!
! <varlistentry>
! <term>-604 (<symbol>ECPG_WARNING_NO_TRANSACTION</symbol>)</term>
! <listitem>
! <para>
! There is no active (in-progress) transaction. (SQLSTATE 25P01)
</para>
</listitem>
</varlistentry>
+ + <varlistentry>+ <term>-605 (<symbol>ECPG_WARNING_PORTAL_EXISTS</symbol>)</term>+ <listitem>+ <para>+ An existing cursor name is specified. (SQLSTATE 42P03)+ </para>+ </listitem>+ </varlistentry>+
</variablelist>
</para>
</sect2>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: satoshi.nagayasu@gmail.com, robertmhaas@gmail.com, meskes@postgresql.org
Subject: Re: ECPG - Some errno definitions don't match to the manual
In-Reply-To: <4C60C7A9.10307@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox