Skip to content

Commit c712cdc

Browse files
author
jseldess
authored
Merge pull request #1057 from cockroachdb/show-all-updates
Update SHOW ALL docs and sidebar
2 parents e2b4e31 + b8a4d71 commit c712cdc

File tree

3 files changed

+40
-34
lines changed

3 files changed

+40
-34
lines changed

_data/sidebar_doc.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ entries:
5656
- title: Install Client Drivers
5757
url: /install-client-drivers.html
5858

59+
- title: SQL Feature Support
60+
url: /sql-feature-support.html
61+
5962
thirdlevel:
6063
- title: SQL Statements
6164
thirdlevelitems:
@@ -216,10 +219,27 @@ entries:
216219
- title: <code>UPSERT</code>
217220
url: /upsert.html
218221

219-
- title: SQL Grammar
220-
url: /sql-grammar.html
222+
- title: SQL Syntax
223+
thirdlevelitems:
224+
225+
- title: Keywords & Identifiers
226+
url: /keywords-and-identifiers.html
227+
228+
- title: Constants
229+
url: /sql-constants.html
230+
231+
- title: Value Expressions
232+
url: /sql-expressions.html
233+
234+
- title: Table Expressions
235+
url: /table-expressions.html
236+
237+
- title: Name Resolution
238+
url: /sql-name-resolution.html
239+
240+
- title: Full SQL Grammar
241+
url: /sql-grammar.html
221242

222-
thirdlevel:
223243
- title: Constraints
224244
thirdlevelitems:
225245

@@ -247,12 +267,6 @@ entries:
247267
- title: Data Definition
248268
thirdlevelitems:
249269

250-
- title: Keywords & Identifiers
251-
url: /keywords-and-identifiers.html
252-
253-
- title: Constants
254-
url: /sql-constants.html
255-
256270
- title: Indexes
257271
url: /indexes.html
258272

@@ -307,15 +321,6 @@ entries:
307321
- title: <code>BYTES</code>
308322
url: /bytes.html
309323

310-
- title: Expressions
311-
thirdlevelitems:
312-
313-
- title: Value Expressions
314-
url: /sql-expressions.html
315-
316-
- title: Table Expressions
317-
url: /table-expressions.html
318-
319324
- title: Privileges
320325
url: /privileges.html
321326

@@ -422,9 +427,6 @@ entries:
422427
- title: CockroachDB in Comparison
423428
url: /cockroachdb-in-comparison.html
424429

425-
- title: SQL Feature Support
426-
url: /sql-feature-support.html
427-
428430
- title: CockroachDB Architecture
429431
url: /cockroachdb-architecture.html
430432

show-all.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Variable | Description
2424
------|------------
2525
`DATABASE` | The default database for the current session, as set by [`SET DATABASE`](set-database.html) or the client's connection string. This variable can be viewed with [`SHOW DATABASE`](show-database.html) as well.
2626
`DEFAULT_TRANSACTION_ISOLATION` | The default transaction isolation level for the current session, as set by `SET DEFAULT_TRANSACTION_ISOLATION` or the client's connection string.
27+
`MAX_INDEX_KEYS` | Not usable; exposed only for ORM compatibility.
28+
`SEARCH_PATH` | A list of databases or namespaces that will be searched to resolve unqualified table or function names. For more details, see [Name Resolution](sql-name-resolution.html).
29+
`SERVER_VERSION` | The version of PostgreSQL that CockroachDB emulates.
2730
`SYNTAX` | The default SQL syntax for the current session, as set by `SET SYNTAX`. This variable can be viewed with `SHOW SYNTAX` as well.
2831
`TIME ZONE` | The default time zone for the current session, as set by [`SET TIME ZONE`](set-time-zone.html). This variable can be viewed with [`SHOW TIME ZONE`](show-time-zone.html) as well.
2932
`TRANSACTION ISOLATION LEVEL` | The isolation level of the current transaction, as set by [`SET TRANSACTION ISOLATION LEVEL`](set-transaction.html). When run in the context of a transaction, [`SHOW TRANSACTION ISOLATION LEVEL`](show-transaction.html) returns this variable as well.<br><br>This will differ from `DEFAULT_TRANSACTION_ISOLATION` only when `SHOW ALL` is run in the context of a transaction and `SET TRANSACTION ISOLATION LEVEL` has been used to set a non-default isolation level for the specific transaction.
@@ -34,18 +37,22 @@ Variable | Description
3437
~~~ sql
3538
> SHOW ALL;
3639
~~~
40+
3741
~~~
3842
+-------------------------------+--------------+
3943
| Variable | Value |
4044
+-------------------------------+--------------+
41-
| DATABASE | bank |
45+
| DATABASE | test |
4246
| DEFAULT_TRANSACTION_ISOLATION | SERIALIZABLE |
47+
| MAX_INDEX_KEYS | 32 |
48+
| SEARCH_PATH | pg_catalog |
49+
| SERVER_VERSION | 9.5.0 |
4350
| SYNTAX | Traditional |
4451
| TIME ZONE | UTC |
4552
| TRANSACTION ISOLATION LEVEL | SERIALIZABLE |
4653
| TRANSACTION PRIORITY | NORMAL |
4754
+-------------------------------+--------------+
48-
(6 rows)
55+
(9 rows)
4956
~~~
5057

5158
## See Also

sql-name-resolution.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ toc: false
77
A SQL client can have access to multiple databases side-by-side. The
88
same table name (e.g., `orders`) can exist in multiple
99
databases. When a query specifies a table name without a database
10-
name (e.g., `select * from orders`), how does CockroachDB know
10+
name (e.g., `SELECT * FROM orders`), how does CockroachDB know
1111
which `orders` table is being considered?
1212

13-
This page details how CockroachDB performs *name resolution* to answer
13+
This page details how CockroachDB performs **name resolution** to answer
1414
this question.
1515

1616
<div id="toc"></div>
1717

1818
## Overview
1919

20-
The following *name resolution algorithm* is used both to determine
20+
The following **name resolution algorithm** is used both to determine
2121
table names in [table expressions](table-expressions.html) and
2222
function names in [value expressions](sql-expressions.html):
2323

@@ -28,23 +28,20 @@ function names in [value expressions](sql-expressions.html):
2828
- Try to find the name using the [search path](#search-path).
2929
- If the name is not found, produce an error.
3030

31-
## Search path
31+
## Search Path
3232

33-
In addition to the default database configurable via [`SET DATABASE`](set-database.html),
34-
unqualified names are also looked up in the current session's *search path*.
33+
In addition to the default database configurable via [`SET DATABASE`](set-database.html), unqualified names are also looked up in the current session's *search path*.
3534

3635
The search path is a session variable containing a list of databases,
37-
or *name spaces*, where names are looked up.
36+
or *namespaces*, where names are looked up.
3837

39-
The current search path can be inspected using the statement `SHOW
40-
SEARCH_PATH`, or [`SHOW ALL`](show-all.html).
38+
The current search path can be inspected using the statement `SHOW SEARCH_PATH`, or [`SHOW ALL`](show-all.html).
4139

4240
By default, the search path for new columns includes just
4341
`pg_catalog`, so that queries can use PostgreSQL compatibility
4442
functions and virtual tables in that namespace without the need to
4543
prefix them with "`pg_catalog.`" every time.
4644

47-
## See also
45+
## See Also
4846

49-
- [List of predefined databases](predefined-namespaces.html)
5047
- [`SET DATABASE`](set-database.html)

0 commit comments

Comments
 (0)