Re: PQputline error with pg_restore - Mailing list pgsql-general

From Tom Lane
Subject Re: PQputline error with pg_restore
Date
Msg-id 4973.1139521112@sss.pgh.pa.us
Whole thread Raw
In response to Re: PQputline error with pg_restore  (Jennifer I Drake/O/VCU <drakeji@vcu.edu>)
List pgsql-general
Jennifer I Drake/O/VCU <drakeji@vcu.edu> writes:
> ERROR: copy: line 178286, overflow on numeric ABS(value) >= 10^3 for field with precision 5 scale 3

It would seem that you've got an incorrect (too large) value in a
numeric field in the dumped data.

It's not clear how you got into this state.  If you haven't mucked
with the dump then the value was presumably too large in the source
database, which would imply some bug in Postgres that had let it
escape range checking when it was stored into the table originally.
7.3.2 is so far back that this wouldn't surprise me a whole lot.
If you can reproduce such a problem in a more current version, we'd
like to see the details.

The easiest way to fix things is probably to make pg_restore generate
a SQL script file, edit the script, then load it.  You can either change
the data value if you think it's wrong, or widen the field precision if
you want to keep the data as-is.

            regards, tom lane

pgsql-general by date:

Previous
From: Jennifer I Drake/O/VCU
Date:
Subject: Re: PQputline error with pg_restore
Next
From: "Chandra Sekhar Surapaneni"
Date:
Subject: Re: Update table with data from another table