You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: show-all.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ Variable | Description
24
24
------|------------
25
25
`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.
26
26
`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.
27
30
`SYNTAX` | The default SQL syntax for the current session, as set by `SET SYNTAX`. This variable can be viewed with `SHOW SYNTAX` as well.
28
31
`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.
29
32
`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.
Copy file name to clipboardExpand all lines: sql-name-resolution.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,17 @@ toc: false
7
7
A SQL client can have access to multiple databases side-by-side. The
8
8
same table name (e.g., `orders`) can exist in multiple
9
9
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
11
11
which `orders` table is being considered?
12
12
13
-
This page details how CockroachDB performs *name resolution* to answer
13
+
This page details how CockroachDB performs **name resolution** to answer
14
14
this question.
15
15
16
16
<divid="toc"></div>
17
17
18
18
## Overview
19
19
20
-
The following *name resolution algorithm* is used both to determine
20
+
The following **name resolution algorithm** is used both to determine
21
21
table names in [table expressions](table-expressions.html) and
22
22
function names in [value expressions](sql-expressions.html):
23
23
@@ -28,23 +28,20 @@ function names in [value expressions](sql-expressions.html):
28
28
- Try to find the name using the [search path](#search-path).
29
29
- If the name is not found, produce an error.
30
30
31
-
## Search path
31
+
## Search Path
32
32
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*.
35
34
36
35
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.
38
37
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).
41
39
42
40
By default, the search path for new columns includes just
43
41
`pg_catalog`, so that queries can use PostgreSQL compatibility
44
42
functions and virtual tables in that namespace without the need to
45
43
prefix them with "`pg_catalog.`" every time.
46
44
47
-
## See also
45
+
## See Also
48
46
49
-
-[List of predefined databases](predefined-namespaces.html)
0 commit comments