Re: strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow - Mailing list pgsql-general

From rudi
Subject Re: strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow
Date
Msg-id 108546db-e4dc-4753-b9c5-962cc484fff8@dr5g2000vbb.googlegroups.com
Whole thread Raw
Responses Re: strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
List pgsql-general
On 20 Mai, 22:55, rudi <rudi.stras...@gmail.com> wrote:
> Hi all,
>
> I feel like I hit a bug in postgres 9.0.2 with a query like this
> (there's actually a quite complicated view hidden behind), however
> note
> the  'IN' selection contains two identical keys. When I execute a
> similar query without the duplicate, the query returns, so I would
> conclude it shoud be a bug.
>
> This query fails as you can tell from the output:
>
> mydb=# select * from cpcpk_by_lot where foundry='x' and lot='valerie'
> and epclass='wac' and area='device' and parameter in
> ('RVT_2P_NOM_1UX5_N_VTSAT','RVT_2P_NOM_1UX5_N_VTSAT');
> ERROR:  22003: value out of range: overflow
> LOCATION:  float4mul, float.c:750
>
> while the a practically identical query returns with the expected
> result?
>
> mydb=# select * from cpcpk_by_lot where foundry='x' and lot='valerie'
> and epclass='wac' and area='device' and parameter in
> ('RVT_2P_NOM_1UX5_N_VTSAT');
>
> I hope anyone can give me a hint how to proceed....
>
> Best regards,
> Rudi

I found out that the issues is caused by overflows in floating point
(REAL) operation. After some additional debug info using "VERBOSITY"
that became more or less evident. I wonder whether the behaviour can
be optimized, such that the individual value can be set to 'nan'
instead of causing a fail for the entire query. In a productive
environment this would scare the hell out of me.

In case someone has ideas how such conditions can be avoided, please
forward me some hints. I tend to believe that there must be a better
soluation than the one which is currently in place.

Best regards,
Rudi

pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: Trapping errors
Next
From: Trenta sis
Date:
Subject: Postgres questions