diff --git a/pkg/clickhouse/clickhouse.go b/pkg/clickhouse/clickhouse.go index ceee6bb3..364fa49b 100644 --- a/pkg/clickhouse/clickhouse.go +++ b/pkg/clickhouse/clickhouse.go @@ -473,7 +473,7 @@ func (ch *ClickHouse) prepareGetTablesSQL(tablePattern string, skipDatabases, sk allTablesSQL += " FROM system.tables WHERE is_temporary = 0" if tablePattern != "" { - replacer := strings.NewReplacer(".", "\\.", "$", "\\.", ",", "$|^", "*", ".*", "?", ".", " ", "", "`", "", `"`, "", "-", "\\-") + replacer := strings.NewReplacer(".", "\\.", "$", ".", ",", "$|^", "*", ".*", "?", ".", " ", "", "`", "", `"`, "", "-", "\\-") allTablesSQL += fmt.Sprintf(" AND match(concat(database,'.',name),'^%s$') ", replacer.Replace(tablePattern)) } if len(skipDatabases) > 0 {