-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: support -f
to read SQL from a file
#54741
Conversation
This makes it easier to process a file other than the standard input. Release note: None
pkg/cli/cliflags/flags.go
Outdated
results of each SQL statement are printed on the standard output.`, | ||
results of each SQL statement are printed on the standard output. | ||
|
||
This flag is incompatible with --input-file / -f.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have an alternative, but is input-file
used in other CLIs? The -f feels familiar+intuitive, the --input-file doesn't as much (partly because it doesn't start with an f).
psql uses |
Release note (cli change): `cockroach sql` and `cockroach demo` now support the command-line parameter `--input-file` (shorthand `-f`) to read commands from a named file. The behavior is the same as if the file was redirected on the standard input; in particular, the processing stops at the first error encountered (which is different from interactive usage with a prompt). Note that it is not (yet) possible to combine `-f` with `-e`.
bors r=irfansharif |
Build failed (retrying...): |
Build succeeded: |
54261: ui: add transactions page to Admin UI r=dhartunian a=elkmaster This commit adds the new Transactions Page to the Admin UI. This page is much like the Statements Page but differs in that it shows Transaction-level statistics in tabular and detail form. Every Transaction is able to display its contained Statements for more detailed analysis. The page and its components are imported from the `admin-ui-components` library. Depends on: cockroachdb/yarn-vendored#38 Release justification: low-risk high impact addition to Admin UI Release note (admin ui change): add Transactions and Transactions details pages. These pages allow for viewing stats at the transaction level. 54749: cli/demo: provision an initial non-`root` "demo" user r=irfansharif a=knz Fixes #54557. Requested by @jseldess First 2 commits from #54741 (can be ignored during review) Release note (cli change): `cockroach demo` now pre-creates a `demo` user account with a random password, instead of letting (and encouraging) the user to use the `root` account directly. The `demo` account is currently granted the `admin` role. 54755: sql: fix bug whereby backfiller would drop spans on txn restart r=ajwerner a=ajwerner This bug was caught by testing with #54695. Before that change, it would fail almost immediately, now it does not fail under stress. I'm open to suggestions on how to more generally test this. Release note (bug fix): Fixed a rare bug which can lead to index backfills failing in the face of transaction restarts. Co-authored-by: Vlad <[email protected]> Co-authored-by: Raphael 'kena' Poss <[email protected]> Co-authored-by: Andrew Werner <[email protected]>
Fixes #42955
Release note (cli change):
cockroach sql
andcockroach demo
nowsupport the command-line parameter
--input-file
(shorthand-f
) toread commands from a named file. The behavior is the same as if the
file was redirected on the standard input; in particular, the
processing stops at the first error encountered (which is different
from interactive usage with a prompt).
Note that it is not (yet) possible to combine
-f
with-e
.