Re: cant delete row - Mailing list pgsql-general

From Tom Lane
Subject Re: cant delete row
Date
Msg-id 17217.986486774@sss.pgh.pa.us
Whole thread Raw
In response to Re: cant delete row  ("Oliver Elphick" <olly@lfix.co.uk>)
List pgsql-general
"Oliver Elphick" <olly@lfix.co.uk> writes:
> Tom Lane wrote:
>>>> "Tamsin" <tg_mail@bryncadfan.co.uk> writes:
> test=# delete from order_head where order_head_id = 1581;
> ERROR:  overflow on numeric ABS(value) >= 10^9 for field with precision 8
> scale 2
>>>>
>>>> This is extremely bizarre.  A DELETE does not care what data is in the
>>>> row.  Do you perhaps have rules or triggers on this table that you
>>>> haven't told us about?

> But surely the WHERE clause on this DELETE will care?  I don't know
> how the internal details are arranged, but it sounds as though it is
> the comparison that is blowing up.

No, because the WHERE's comparison is on an integer field.  Besides,
that message comes out when trying to store a numeric value into a
column, not when fetching or doing arithmetic on one.

            regards, tom lane

pgsql-general by date:

Previous
From: "Keith G. Murphy"
Date:
Subject: Re: Data transfer format between UNIX server and Windows client?
Next
From: "Tamsin"
Date:
Subject: RE: cant delete row