Skip to content

canal 1.1.5-alpha2 同步不兼容postgresql #3026

@yansheng105

Description

@yansheng105
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

environment

  • canal version : canal 1.1.5-alpha2
  • mysql version : mysql5.7

Issue Description

使用 canal 1.1.5-alpha2 同步mysql数据到 postgresql 报SQL语法错误。

源代码:

        insertSql.append("INSERT INTO ").append(SyncUtil.getDbTableName(dbMapping)).append(" (");

        columnsMap.forEach((targetColumnName, srcColumnName) -> insertSql.append("`")
            .append(targetColumnName)
            .append("`")
            .append(","));

` 是mysql 的转义字符,postgresql不识别,其他不兼容的关系型数据库也会报错

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions