cli:cockroach sql command should have -f
option to pass sql file
#42955
Labels
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
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.
The text was updated successfully, but these errors were encountered: