{"record":{"id":"b2d6df60487253be","repo":"apache/seatunnel","slug":"the-time-column-type-time-is-out-of-range-b2d6df","errorCode":null,"errorMessage":"The time column {} type time({}) is out of range, which exceeds the maximum scale of {}, it will be converted to time({})","messagePattern":"The time column (.+?) type time\\((.+?)\\) is out of range, which exceeds the maximum scale of (.+?), it will be converted to time\\((.+?)\\)","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":424,"sourceCode":"                    builder.dataType(PG_TEXT);\n                } else if (column.getColumnLength() <= MAX_VARCHAR_LENGTH) {\n                    builder.columnType(\n                            String.format(\"%s(%s)\", PG_VARCHAR, column.getColumnLength()));\n                    builder.dataType(PG_VARCHAR);\n                } else {\n                    builder.columnType(PG_TEXT);\n                    builder.dataType(PG_TEXT);\n                }\n                break;\n            case DATE:\n                builder.columnType(PG_DATE);\n                builder.dataType(PG_DATE);\n                break;\n            case TIME:\n                Integer timeScale = column.getScale();\n                if (timeScale != null && timeScale > MAX_TIME_SCALE) {\n                    timeScale = MAX_TIME_SCALE;\n                    log.warn(\n                            \"The time column {} type time({}) is out of range, \"\n                                    + \"which exceeds the maximum scale of {}, \"\n                                    + \"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();","sourceCodeStart":406,"sourceCodeEnd":442,"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#L406-L442","documentation":"Logged by PostgresTypeConverter.reconvert when a TIME column's fractional-second scale exceeds the maximum supported time scale. The scale is clamped to MAX_TIME_SCALE and extra precision is silently truncated.","triggerScenarios":"Sink TIME column with scale > MAX_TIME_SCALE (Postgres TIME supports up to 6 digits).","commonSituations":"Sources with nanosecond time (9 digits, e.g. MySQL TIME(6)/other engines) written to Postgres.","solutions":["Truncate the time column in source (e.g. CAST(col AS TIME(6)))","Define the sink column as TIME without excess scale","Accept sub-microsecond digits being dropped"],"exampleFix":"// before: TIME(9)\n// after: CAST(col AS TIME(6))","handlingStrategy":"validation","validationCode":"if (column.getScale() != null && column.getScale() > 6) { /* CAST source to TIME(6) */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cap time precision at 6 digits when targeting Postgres","Watch logs after job start for conversion warnings"],"tags":["jdbc","postgres","time","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"}