Re: strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow

From: rudi <rudi(dot)strasser(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: strange behaviour in 9.0.2 / ERROR: 22003: value out of range: overflow
Date: 2011-05-23 20:53:10
Message-ID: 108546db-e4dc-4753-b9c5-962cc484fff8@dr5g2000vbb.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 20 Mai, 22:55, rudi <rudi(dot)stras(dot)(dot)(dot)(at)gmail(dot)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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Trenta sis 2011-05-23 22:10:08 Postgres questions
Previous Message Bailey, Rick 2011-05-23 20:38:24 PostgreSQL and SSIS