diff --git a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/CommonRdbmsWriter.java b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/CommonRdbmsWriter.java index 7b84c32088..2cd00cb120 100755 --- a/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/CommonRdbmsWriter.java +++ b/plugin-rdbms-util/src/main/java/com/alibaba/datax/plugin/rdbms/writer/CommonRdbmsWriter.java @@ -538,6 +538,13 @@ protected PreparedStatement fillPreparedStatementColumnType(PreparedStatement pr case Types.BIT: if (this.dataBaseType == DataBaseType.MySql) { preparedStatement.setBoolean(columnIndex + 1, column.asBoolean()); + } else if (this.dataBaseType == DataBaseType.PostgreSQL) { + Boolean booleanValue = column.asBoolean(); + if (booleanValue) { + preparedStatement.setString(columnIndex + 1, "1"); + } else { + preparedStatement.setString(columnIndex + 1, "0"); + } } else { preparedStatement.setString(columnIndex + 1, column.asString()); }