cockroachdb / cockroachdb/cockroach

cmd: sync cockroach-sql flags with cockroach sql

Open
#125,939 1 comment 0 reactions 0 assignees View on GitHub
A-cli-flags C-cleanup C-enhancement E-quick-win T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**
Our [docs](https://www.cockroachlabs.com/docs/stable/cockroach-sql-binary) state the following:

> the cockroach-sql command is a client for executing SQL statements from an interactive shell or directly from the command line. cockroach-sql is functionally equivalent to the [cockroach sql command](https://www.cockroachlabs.com/docs/v23.2/cockroach-sql).

However, there are many flags that `cockroach sql` supports that `cockroach-sql` does not. For instance, the `--format` flag works as expected with `cockroach sql`:

```
anniepompa in ~/go/src/github.com/cockroachdb/cockroach on fp-debug-doctor-jobs ● ● λ cockroach sql --format=csv -e="select 1" --insecure
?column?
1

Time: 0ms
```

But with `cockroach-sql`:
```
anniepompa in ~/go/src/github.com/cockroachdb/cockroach on fp-debug-doctor-jobs ● ● λ ./cockroach-sql --format=csv -e="select 1" --insecure
ERROR: unknown flag: --format
```
This has been the case since `cockroach-sql` was been introduced (v22.1).

**Describe the solution you'd like**
We should sync the flags

Jira issue: CRDB-39676

Epic CRDB-23743

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.