From: dmp <danap@ttc-cmc.net>
To: Johann 'Myrkraverk' Oskarsson <johann@2ndquadrant.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: SQL Error Code Anomaly
Date: Tue, 10 Jul 2012 19:21:36 -0600
Message-ID: <4FFCD520.8010307@ttc-cmc.net> (raw)
In-Reply-To: <t0lxnl.x5t0lxnl.a9z8.ufd4.gnus@asuka.myrkraverk.com>
References: <t0lxnl.x5t0lxnl.a9z8.ufd4.gnus@asuka.myrkraverk.com>
Johann 'Myrkraverk' Oskarsson wrote:
> Hi,
>
> During my work on the binary stream patch, I came across this:
>
> The error code PSQLState.NUMERIC_CONSTANT_OUT_OF_RANGE = 42820 is not
> defined in
>
> http://www.postgresql.org/docs/9.1/interactive/errcodes-appendix.html
>
> Is this a concern? Is there a list of error codes defined by the JDBC
> driver somewhere? I did not see anything at first glance.
>
> I did not come across 42820 in the SQL standard either. Only that 42xxx
> is _syntax error or access rule violation_.
> I have not investigated this further.
I do not know if this is much more help, but the PSQLState class has a
general comment for a list of states which NUMERIC_CONSTANT_OUT_OF_RANGE
is one:
/**
* The server sent us a response the driver was not prepared for and
* is either bizarre datastream corruption, a driver bug, or
* a protocol violation on the server's part.
*/
Upon a little futher digging this particular state is associated with the
two classes PGInterval & PGMoney. In PGInterval it is thrown on a Number
FormatException looks like if an invalid character is given for the interval.
In PGMoney likewise. Both of these occurs while setting the Value. Now my
code is a litle out of date so this might not be totally accurate.
danap.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: danap@ttc-cmc.net, johann@2ndquadrant.com
Subject: Re: SQL Error Code Anomaly
In-Reply-To: <4FFCD520.8010307@ttc-cmc.net>
References: <t0lxnl.x5t0lxnl.a9z8.ufd4.gnus@asuka.myrkraverk.com> <4FFCD520.8010307@ttc-cmc.net>
* 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