Medium severitydata format
Power BI Refresh Error:
22003
What does this error mean?
A numeric value exceeds the range of the target data type (e.g., inserting a value greater than 2,147,483,647 into an INTEGER column).
Common causes
- 1Source system uses larger numeric types than the destination PostgreSQL column
- 2Column defined as INTEGER but data has grown beyond 32-bit range — needs BIGINT
- 3Calculation overflow in a stored procedure or query
How to fix it
- 1Step 1: Check the column type: `\d <table_name>` and compare with the source data range.
- 2Step 2: Migrate the column to BIGINT or NUMERIC as appropriate: `ALTER TABLE t ALTER COLUMN c TYPE BIGINT;`.
- 3Step 3: Add range validation in the ETL pipeline before loading.
- 4Step 4: Review sequences — if the column is a serial primary key, it may be approaching the INTEGER limit.
Frequently asked questions
Official documentation: https://www.postgresql.org/docs/current/errcodes-appendix.html