title | summary | toc | docs_area |
---|---|---|---|
SHOW {session variable} |
The SHOW statement displays the current settings for the client session. |
true |
reference.sql |
Use the SHOW
[statement]({% link {{ page.version.version }}/sql-statements.md %}) to display the value of one or all of the session variables. You configure session variables using [SET
]({% link {{ page.version.version }}/set-vars.md %}).
No [privileges]({% link {{ page.version.version }}/security-reference/authorization.md %}#managing-privileges) are required to display the session variables.
{{site.data.alerts.callout_info}}
The SHOW
statement for session variables is unrelated to the other SHOW
statements like [SHOW CLUSTER SETTING
]({% link {{ page.version.version }}/show-cluster-setting.md %}), [SHOW CREATE
]({% link {{ page.version.version }}/show-create.md %}), and [SHOW DATABASES
]({% link {{ page.version.version }}/show-databases.md %}).
{{site.data.alerts.end}}
Parameter | Description |
---|---|
var_name |
The session variable name to show. The variable name is case-insensitive and can be enclosed in double quotes. |
{% include {{ page.version.version }}/misc/session-vars.md %}
For session variables on features in preview, see [Features in Preview]({% link {{ page.version.version }}/cockroachdb-feature-availability.md %}).
Special syntax cases supported for compatibility:
Syntax | Equivalent to |
---|---|
SHOW TRANSACTION PRIORITY |
SHOW "transaction priority" |
SHOW TRANSACTION ISOLATION LEVEL |
SHOW "transaction isolation level" |
SHOW TIME ZONE |
SHOW "timezone" |
SHOW TRANSACTION STATUS |
SHOW "transaction status" |
{% include_cached copy-clipboard.html %}
> SHOW DATABASE;
database
------------
movr
(1 row)
{% include_cached copy-clipboard.html %}
> SHOW ALL;
variable | value
----------------------+-------------------
application_name | $ cockroach demo
bytea_output | hex
client_encoding | UTF8
client_min_messages | notice
...
- [
SET {session variable}
]({% link {{ page.version.version }}/set-vars.md %}) - [Transactions]({% link {{ page.version.version }}/transactions.md %}), including [Priority levels]({% link {{ page.version.version }}/transactions.md %}#transaction-priorities)
- [
SHOW CLUSTER SETTING
]({% link {{ page.version.version }}/show-cluster-setting.md %}) - [
SHOW COLUMNS
]({% link {{ page.version.version }}/show-columns.md %}) - [
SHOW CONSTRAINTS
]({% link {{ page.version.version }}/show-constraints.md %}) - [
SHOW CREATE
]({% link {{ page.version.version }}/show-create.md %}) - [
SHOW DATABASES
]({% link {{ page.version.version }}/show-databases.md %}) - [
SHOW GRANTS
]({% link {{ page.version.version }}/show-grants.md %}) - [
SHOW INDEX
]({% link {{ page.version.version }}/show-index.md %}) - [
SHOW USERS
]({% link {{ page.version.version }}/show-users.md %})