-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
sql: add \x slash command as alias for \set display_format=records #56706
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. It looks like you have not filled out the issue in the format of any of our templates. To best assist you, we advise you to use one of these templates. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
`psql` has a `\x` command to toggle extended output for results. CRDB already supports this output format via `\set display_format=records`. This commit adds `\x [on|off]` to toggle between `records` and `table` display formats. The `auto` option from `psql` to automatically enable extended output depending on the result width is not supported, only `on` and `off`. Resolves cockroachdb#56706. Release note (cli change): A `\x [on|off]` command has been added to toggle the `records` display format, following `psql` behavior.
56829: cli: add \x command to toggle records display format r=knz a=erikgrinaker `psql` has a `\x` command to toggle extended output for results. CRDB already supports this output format via `\set display_format=records`. This commit adds `\x [on|off]` to toggle between `records` and `table` display formats. The `auto` option from `psql` to automatically enable extended output depending on the result width is not supported, only `on` and `off`. Resolves #56706. Release note (cli change): A `\x [on|off]` command has been added to toggle the `records` display format, following `psql` behavior. Also adds support for `yes` and `no` as boolean options for slash commands as a separate commit, following `psql`. 56840: util, server: fix memory detection with non-root cgroups r=darinpp a=darinpp The cgroup information is constructed by looking at `/proc/self/cgroup`, matching with the mount point in `/proc/self/mountinfo` and then inpsecting the `memory.stat` file. The matching between the cgroup and the mount point was working only in case that the mount and the cgroup are exact match relative to cgroup NS. This is however inadequate as while true for the docker case, it isn't true in the general case. In this example determining the cgroup memory limit isn't possible: ``` cgcreate -t $USER:$USER -a $USER:$USER -g memory:crdb_test echo 3999997952 > /sys/fs/cgroup/memory/crdb_test/memory.limit_in_bytes cgexec -g memory:crdb_test ./cockroach start-single-nod ``` To address this, this patch instead constructs the expected relative path of the cgroup's memory info by starting with the mount path and then adding the cgroup. Release note: None Co-authored-by: Erik Grinaker <[email protected]> Co-authored-by: Darin Peshev <[email protected]>
psql
has a\x [on|off|auto]
slash command to switch between table and record output:cockroach sql
supports the same output formats, but uses\set display_format=records
instead:I propose adding
\x
as an alias for toggling betweenrecords
andtable
, and supporting the optionalon
andoff
parameters (but notauto
in the first iteration).The text was updated successfully, but these errors were encountered: