Skip to content

cmd: sync cockroach-sql flags with cockroach sql #125939

Open
@annrpom

Description

@annrpom

Is your feature request related to a problem? Please describe.
Our docs 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cli-flagsPertains to CLI flag handling common to all CLI commandsC-cleanupTech debt, refactors, loose ends, etc. Solution not expected to significantly change behavior.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)E-quick-winLikely to be a quick win for someone experienced.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions