cockroachdb / cockroachdb/cockroach
crosscluster/logical: improve ux around specifying table targets in multi table LDR
- 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
Assessment
This issue has not been assessed yet.