Support Article
Arithmetic Overflow occurs on inputting values to a table
SA-48616
Summary
Arithmetic Overflow occurs while inserting values into pr_perf_stats table.
Error Messages
ERROR: numeric field overflow
Detail: A field with precision 9, scale 6 must round to an absolute value less than 10^3.
Steps to Reproduce
Not Applicable
Root Cause
The below column values were greater than the specified column values specification in the database:
- pxDecryptCount
- pxDecryptCPU
- pxDecryptElapsed
- pxEncryptElapsed
- pxEncryptCPU
- pxEncryptCount
Resolution
- Extract AlterScripts.sql from HFix-40025.
- Run that SQL manually on the database.
- Alter the table scripts specific to PostgreSQL database to increase the column size from (9,6) to (18,6).
alter table <prpcdataSchema>.pr_perf_stats alter column pxDecryptCPU TYPE numeric(18,6);
alter table <prpcdataSchema>.pr_perf_stats alter column pxDecryptElapsed TYPE numeric(18,6);
alter table <prpcdataSchema>.pr_perf_stats alter column pxEncryptElapsed TYPE numeric(18,6);
alter table <prpcdataSchema>.pr_perf_stats alter column pxEncryptCPU TYPE numeric(18,6);
alter table <prpcdataSchema>.pr_perf_stats alter column pxEncryptCount TYPE numeric(18,6);
Published January 1, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.