cockroachdb / cockroachdb/cockroach

crosscluster/logical: improve ux around specifying table targets in multi table LDR

Open
#133,704 1 comment 0 reactions 0 assignees View on GitHub
A-disaster-recovery C-enhancement P-2 T-disaster-recovery
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, this fails to parse with an opaque error:
```
roachprod@localhost:29008/defaultdb> CREATE LOGICAL REPLICATION STREAM FROM TABLES (customer, district, history,
-> item, new_order, order_line, order, stock, warehouse) ON source INTO TABLES
-> (customer, district, history, item, new_order, order_line, order, stock,
-> warehouse);
ERROR: statement ignored: at or near "order": syntax error
```
But passing the db name does parse:
```
roachprod@localhost:29008/defaultdb> CREATE LOGICAL REPLICATION STREAM FROM TABLES (tpcc.customer, tpcc.district,
-> tpcc.history, tpcc.item, tpcc.new_order, tpcc.order_line, tpcc.order,
-> tpcc.stock, tpcc.warehouse) ON source INTO TABLES (tpcc.customer,
-> tpcc.district, tpcc.history, tpcc.item, tpcc.new_order, tpcc.order_line,
-> tpcc.order, tpcc.stock, tpcc.warehouse);
```

If the user passes a single table without the fully qualified name, the stmt parses!

Jira issue: CRDB-43733

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.