-
Notifications
You must be signed in to change notification settings - Fork 4.1k
cli:cockroach sql command should have -f option to pass sql file #42955
Copy link
Copy link
Closed
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
Is your feature request related to a problem? Please describe.
today, I only see an option of passing a sql command to cockroach sql with --execute flag. I'd like to see an option to pass a file instead. Lack of this ability forces one to do bash trickery to pass a file like so cockroach sql --insecure --host=localhost:26257 --database="tabular_import" --execute="$(< import_statement.sql)
Describe the solution you'd like
a more convenient solution is to see an option to pass a file with a switch like -f
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)