{"record":{"id":"be182b9b45ad8dd8","repo":"apache/seatunnel","slug":"the-timestamp-column-type-timestamp-is-out-be182b","errorCode":null,"errorMessage":"The timestamp column {} type timestamp({}) is out of range, which exceeds the maximum scale of {}, it will be converted to timestamp({})","messagePattern":"The timestamp column (.+?) type timestamp\\((.+?)\\) is out of range, which exceeds the maximum scale of (.+?), it will be converted to timestamp\\((.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresTypeConverter.java","lineNumber":445,"sourceCode":"                                    + \"it will be converted to time({})\",\n                            column.getName(),\n                            column.getScale(),\n                            MAX_SCALE,\n                            timeScale);\n                }\n                if (timeScale != null && timeScale > 0) {\n                    builder.columnType(String.format(\"%s(%s)\", PG_TIME, timeScale));\n                } else {\n                    builder.columnType(PG_TIME);\n                }\n                builder.dataType(PG_TIME);\n                builder.scale(timeScale);\n                break;\n            case TIMESTAMP:\n                Integer timestampScale = column.getScale();\n                if (timestampScale != null && timestampScale > MAX_TIMESTAMP_SCALE) {\n                    timestampScale = MAX_TIMESTAMP_SCALE;\n                    log.warn(\n                            \"The timestamp column {} type timestamp({}) is out of range, \"\n                                    + \"which exceeds the maximum scale of {}, \"\n                                    + \"it will be converted to timestamp({})\",\n                            column.getName(),\n                            column.getScale(),\n                            MAX_TIMESTAMP_SCALE,\n                            timestampScale);\n                }\n                if (timestampScale != null && timestampScale > 0) {\n                    builder.columnType(String.format(\"%s(%s)\", PG_TIMESTAMP, timestampScale));\n                } else {\n                    builder.columnType(PG_TIMESTAMP);\n                }\n                builder.dataType(PG_TIMESTAMP);\n                builder.scale(timestampScale);\n                break;\n            case TIMESTAMP_TZ:\n                Integer timestampTzScale = column.getScale();","sourceCodeStart":427,"sourceCodeEnd":463,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresTypeConverter.java#L427-L463","documentation":"WARN logged by PostgresTypeConverter.reconvert when a timestamp column's requested scale exceeds the PostgreSQL maximum; the scale is capped at MAX_SCALE and the reduced timestamp(scale) is emitted in the DDL. Type-adjustment warning only.","triggerScenarios":"Sink TIMESTAMP column with scale > MAX_TIMESTAMP_SCALE (Postgres supports up to 6 fractional digits).","commonSituations":"Nanosecond-precision timestamps (9 digits) from engines like Spark/MySQL 8 written to Postgres.","solutions":["CAST source column to TIMESTAMP(6)","Declare the sink column with scale <= 6","Accept truncation of sub-microsecond precision"],"exampleFix":"// before: TIMESTAMP(9)\n// after: CAST(col AS TIMESTAMP(6))","handlingStrategy":"validation","validationCode":"if (column.getScale() != null && column.getScale() > 6) { /* CAST source to TIMESTAMP(6) */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use TIMESTAMP(6) or less in source pipelines feeding Postgres","Expect truncation of nanosecond digits and validate data fidelity"],"tags":["jdbc","postgres","timestamp","precision"],"backgroundTag":"value-out-of-range","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}