Skip to content

MaterializedPostgreSQL: failed CREATE TABLE (publication name is not escaped) #55251

Description

@statsbro-user

When I try to

CREATE TABLE  (....) 
ENGINE = MaterializedPostgresSQL('myserver.postgres.database.azure.com:5432', 'sparklint-prod', 'table', 'ro_user', '*********')
PRIMRY KEY id;
SQL Error [1002] [07000]: std::exception. Code: 1001, type: pqxx::syntax_error, e.what() = ERROR:  syntax error at or near "-"
LINE 1: CREATE PUBLICATION sparklint-prod_table_ch_publication FOR TABLE...

How to reproduce

  • Which ClickHouse server version to use 23.9.1.1854

The problem is that db name contains dash, and Clickhouse is not handling it property as the PUBLICATION name should not contain any dashes, quick solution for that is to put quotations marks around the PUBLCATION name, but then it will probably cause some problems in Clickhouse when it resolves names later in data processing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    experimental featureBug in the feature that should not be used in production

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions