Ver Fonte

修复PG空时间戳 https://gitee.com/ghi/dbsyncer/issues/I79PPS

AE86 há 1 ano atrás
pai
commit
a1bd182d8c

+ 2 - 0
dbsyncer-listener/src/main/java/org/dbsyncer/listener/postgresql/column/PgColumnValue.java

@@ -83,6 +83,8 @@ public final class PgColumnValue extends AbstractColumnValue<String> {
             return Timestamp.from(toInstantFromMicros(PGStatement.DATE_POSITIVE_INFINITY));
         } else if ("-infinity".equals(asString())) {
             return Timestamp.from(toInstantFromMicros(PGStatement.DATE_NEGATIVE_INFINITY));
+        } else if ("null".equals(asString()) || StringUtil.isBlank(asString())) {
+            return null;
         }
         return DateFormatUtil.timeWithoutTimeZoneToTimestamp(asString());
     }