Skip to content

Commit f5610a8

Browse files
committed
Merge remote-tracking branch 'origin/main' into DOC-10406
2 parents 266da4e + 3a8b0d8 commit f5610a8

File tree

38 files changed

+273
-324
lines changed

38 files changed

+273
-324
lines changed

src/current/_data/releases.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6074,15 +6074,8 @@
60746074
major_version: v24.1
60756075
release_date: '2024-05-20'
60766076
release_type: Production
6077-
cloud_only: true
6078-
cloud_only_message_short: 'Available in CockroachDB Dedicated. Self-hosted binaries <a href="https://www.cockroachlabs.com/docs/releases/v24.1#v24-1-0">available June 3, 2024</a> per the <a href="https://www.cockroachlabs.com/docs/releases/staged-release-process">staged release process</a>.'
6079-
cloud_only_message: >
6080-
CockroachDB v24.1 is now generally available for CockroachDB Dedicated,
6081-
and is scheduled to be made available for CockroachDB Self-Hosted on June 3, 2024 per the <a href="https://www.cockroachlabs.com/docs/releases/staged-release-process">staged release process</a>.
6082-
For more information, refer to
6083-
[Upgrade to CockroachDB v24.1](https://www.cockroachlabs.com/docs/cockroachcloud/upgrade-to-v24.1). To connect to a CockroachDB Dedicated cluster on v24.1, refer to [Connect to a CockroachDB Dedicated Cluster](https://www.cockroachlabs.com/docs/cockroachcloud/connect-to-your-cluster).
60846077
go_version: go1.22.0
6085-
sha: 6205244e922606f85761dad2137b842f43a53716
6078+
sha: 5e4ca9e26f1a25681de9c944298cfa139c344466
60866079
has_sql_only: true
60876080
has_sha256sum: true
60886081
mac:
@@ -6097,7 +6090,7 @@
60976090
linux_intel_fips: true
60986091
linux_arm_fips: false
60996092
docker:
6100-
docker_image: cockroachdb/cockroach-unstable
6093+
docker_image: cockroachdb/cockroach
61016094
docker_arm: true
61026095
docker_arm_experimental: false
61036096
docker_arm_limited_access: false
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The `CHANGEFEED` privilege in order to create and manage changefeed jobs. Refer to [Required privileges]({% link {{site.current_cloud_version}}/create-changefeed.md %}#required-privileges) for more details.
Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,33 @@
1-
When the schema of a table targeted by a prepared statement changes before the prepared statement is executed, CockroachDB allows the prepared statement to return results based on the changed table schema, for example:
1+
When the schema of a table targeted by a prepared statement changes after the prepared statement is created, future executions of the prepared statement could result in an error. For example, adding a column to a table referenced in a prepared statement with a `SELECT *` clause will result in an error:
22

3-
{% include copy-clipboard.html %}
3+
{% include_cached copy-clipboard.html %}
44
~~~ sql
5-
> CREATE TABLE users (id INT PRIMARY KEY);
5+
CREATE TABLE users (id INT PRIMARY KEY);
66
~~~
77

8-
{% include copy-clipboard.html %}
8+
{% include_cached copy-clipboard.html %}
99
~~~ sql
10-
> PREPARE prep1 AS SELECT * FROM users;
10+
PREPARE prep1 AS SELECT * FROM users;
1111
~~~
1212

13-
{% include copy-clipboard.html %}
13+
{% include_cached copy-clipboard.html %}
1414
~~~ sql
15-
> ALTER TABLE users ADD COLUMN name STRING;
15+
ALTER TABLE users ADD COLUMN name STRING;
1616
~~~
1717

18-
{% include copy-clipboard.html %}
18+
{% include_cached copy-clipboard.html %}
1919
~~~ sql
20-
> INSERT INTO users VALUES (1, 'Max Roach');
20+
INSERT INTO users VALUES (1, 'Max Roach');
2121
~~~
2222

23-
{% include copy-clipboard.html %}
23+
{% include_cached copy-clipboard.html %}
2424
~~~ sql
25-
> EXECUTE prep1;
25+
EXECUTE prep1;
2626
~~~
2727

2828
~~~
29-
+----+-----------+
30-
| id | name |
31-
+----+-----------+
32-
| 1 | Max Roach |
33-
+----+-----------+
34-
(1 row)
29+
ERROR: cached plan must not change result type
30+
SQLSTATE: 0A000
3531
~~~
3632

37-
It's therefore recommended to **not** use `SELECT *` in queries that will be repeated, via prepared statements or otherwise.
38-
39-
Also, a prepared [`INSERT`](insert.html), [`UPSERT`](upsert.html), or [`DELETE`](delete.html) statement acts inconsistently when the schema of the table being written to is changed before the prepared statement is executed:
40-
41-
- If the number of columns has increased, the prepared statement returns an error but nonetheless writes the data.
42-
- If the number of columns remains the same but the types have changed, the prepared statement writes the data and does not return an error.
33+
It's therefore recommended to explicitly list result columns instead of using `SELECT *` in prepared statements, when possible.
Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,33 @@
1-
When the schema of a table targeted by a prepared statement changes before the prepared statement is executed, CockroachDB allows the prepared statement to return results based on the changed table schema, for example:
1+
When the schema of a table targeted by a prepared statement changes after the prepared statement is created, future executions of the prepared statement could result in an error. For example, adding a column to a table referenced in a prepared statement with a `SELECT *` clause will result in an error:
22

3-
{% include copy-clipboard.html %}
3+
{% include_cached copy-clipboard.html %}
44
~~~ sql
5-
> CREATE TABLE users (id INT PRIMARY KEY);
5+
CREATE TABLE users (id INT PRIMARY KEY);
66
~~~
77

8-
{% include copy-clipboard.html %}
8+
{% include_cached copy-clipboard.html %}
99
~~~ sql
10-
> PREPARE prep1 AS SELECT * FROM users;
10+
PREPARE prep1 AS SELECT * FROM users;
1111
~~~
1212

13-
{% include copy-clipboard.html %}
13+
{% include_cached copy-clipboard.html %}
1414
~~~ sql
15-
> ALTER TABLE users ADD COLUMN name STRING;
15+
ALTER TABLE users ADD COLUMN name STRING;
1616
~~~
1717

18-
{% include copy-clipboard.html %}
18+
{% include_cached copy-clipboard.html %}
1919
~~~ sql
20-
> INSERT INTO users VALUES (1, 'Max Roach');
20+
INSERT INTO users VALUES (1, 'Max Roach');
2121
~~~
2222

23-
{% include copy-clipboard.html %}
23+
{% include_cached copy-clipboard.html %}
2424
~~~ sql
25-
> EXECUTE prep1;
25+
EXECUTE prep1;
2626
~~~
2727

2828
~~~
29-
+----+-----------+
30-
| id | name |
31-
+----+-----------+
32-
| 1 | Max Roach |
33-
+----+-----------+
34-
(1 row)
29+
ERROR: cached plan must not change result type
30+
SQLSTATE: 0A000
3531
~~~
3632

37-
It's therefore recommended to **not** use `SELECT *` in queries that will be repeated, via prepared statements or otherwise.
38-
39-
Also, a prepared [`INSERT`](insert.html), [`UPSERT`](upsert.html), or [`DELETE`](delete.html) statement acts inconsistently when the schema of the table being written to is changed before the prepared statement is executed:
40-
41-
- If the number of columns has increased, the prepared statement returns an error but nonetheless writes the data.
42-
- If the number of columns remains the same but the types have changed, the prepared statement writes the data and does not return an error.
33+
It's therefore recommended to explicitly list result columns instead of using `SELECT *` in prepared statements, when possible.
Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,33 @@
1-
When the schema of a table targeted by a prepared statement changes before the prepared statement is executed, CockroachDB allows the prepared statement to return results based on the changed table schema, for example:
1+
When the schema of a table targeted by a prepared statement changes after the prepared statement is created, future executions of the prepared statement could result in an error. For example, adding a column to a table referenced in a prepared statement with a `SELECT *` clause will result in an error:
22

3-
{% include copy-clipboard.html %}
3+
{% include_cached copy-clipboard.html %}
44
~~~ sql
5-
> CREATE TABLE users (id INT PRIMARY KEY);
5+
CREATE TABLE users (id INT PRIMARY KEY);
66
~~~
77

8-
{% include copy-clipboard.html %}
8+
{% include_cached copy-clipboard.html %}
99
~~~ sql
10-
> PREPARE prep1 AS SELECT * FROM users;
10+
PREPARE prep1 AS SELECT * FROM users;
1111
~~~
1212

13-
{% include copy-clipboard.html %}
13+
{% include_cached copy-clipboard.html %}
1414
~~~ sql
15-
> ALTER TABLE users ADD COLUMN name STRING;
15+
ALTER TABLE users ADD COLUMN name STRING;
1616
~~~
1717

18-
{% include copy-clipboard.html %}
18+
{% include_cached copy-clipboard.html %}
1919
~~~ sql
20-
> INSERT INTO users VALUES (1, 'Max Roach');
20+
INSERT INTO users VALUES (1, 'Max Roach');
2121
~~~
2222

23-
{% include copy-clipboard.html %}
23+
{% include_cached copy-clipboard.html %}
2424
~~~ sql
25-
> EXECUTE prep1;
25+
EXECUTE prep1;
2626
~~~
2727

2828
~~~
29-
+----+-----------+
30-
| id | name |
31-
+----+-----------+
32-
| 1 | Max Roach |
33-
+----+-----------+
34-
(1 row)
29+
ERROR: cached plan must not change result type
30+
SQLSTATE: 0A000
3531
~~~
3632

37-
It's therefore recommended to **not** use `SELECT *` in queries that will be repeated, via prepared statements or otherwise.
38-
39-
Also, a prepared [`INSERT`](insert.html), [`UPSERT`](upsert.html), or [`DELETE`](delete.html) statement acts inconsistently when the schema of the table being written to is changed before the prepared statement is executed:
40-
41-
- If the number of columns has increased, the prepared statement returns an error but nonetheless writes the data.
42-
- If the number of columns remains the same but the types have changed, the prepared statement writes the data and does not return an error.
33+
It's therefore recommended to explicitly list result columns instead of using `SELECT *` in prepared statements, when possible.
Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,33 @@
1-
When the schema of a table targeted by a prepared statement changes before the prepared statement is executed, CockroachDB allows the prepared statement to return results based on the changed table schema, for example:
1+
When the schema of a table targeted by a prepared statement changes after the prepared statement is created, future executions of the prepared statement could result in an error. For example, adding a column to a table referenced in a prepared statement with a `SELECT *` clause will result in an error:
22

3-
{% include copy-clipboard.html %}
3+
{% include_cached copy-clipboard.html %}
44
~~~ sql
5-
> CREATE TABLE users (id INT PRIMARY KEY);
5+
CREATE TABLE users (id INT PRIMARY KEY);
66
~~~
77

8-
{% include copy-clipboard.html %}
8+
{% include_cached copy-clipboard.html %}
99
~~~ sql
10-
> PREPARE prep1 AS SELECT * FROM users;
10+
PREPARE prep1 AS SELECT * FROM users;
1111
~~~
1212

13-
{% include copy-clipboard.html %}
13+
{% include_cached copy-clipboard.html %}
1414
~~~ sql
15-
> ALTER TABLE users ADD COLUMN name STRING;
15+
ALTER TABLE users ADD COLUMN name STRING;
1616
~~~
1717

18-
{% include copy-clipboard.html %}
18+
{% include_cached copy-clipboard.html %}
1919
~~~ sql
20-
> INSERT INTO users VALUES (1, 'Max Roach');
20+
INSERT INTO users VALUES (1, 'Max Roach');
2121
~~~
2222

23-
{% include copy-clipboard.html %}
23+
{% include_cached copy-clipboard.html %}
2424
~~~ sql
25-
> EXECUTE prep1;
25+
EXECUTE prep1;
2626
~~~
2727

2828
~~~
29-
+----+-----------+
30-
| id | name |
31-
+----+-----------+
32-
| 1 | Max Roach |
33-
+----+-----------+
34-
(1 row)
29+
ERROR: cached plan must not change result type
30+
SQLSTATE: 0A000
3531
~~~
3632

37-
It's therefore recommended to **not** use `SELECT *` in queries that will be repeated, via prepared statements or otherwise.
38-
39-
Also, a prepared [`INSERT`](insert.html), [`UPSERT`](upsert.html), or [`DELETE`](delete.html) statement acts inconsistently when the schema of the table being written to is changed before the prepared statement is executed:
40-
41-
- If the number of columns has increased, the prepared statement returns an error but nonetheless writes the data.
42-
- If the number of columns remains the same but the types have changed, the prepared statement writes the data and does not return an error.
33+
It's therefore recommended to explicitly list result columns instead of using `SELECT *` in prepared statements, when possible.
Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
1-
When the schema of a table targeted by a prepared statement changes before the prepared statement is executed, CockroachDB allows the prepared statement to return results based on the changed table schema, for example:
1+
When the schema of a table targeted by a prepared statement changes after the prepared statement is created, future executions of the prepared statement could result in an error. For example, adding a column to a table referenced in a prepared statement with a `SELECT *` clause will result in an error:
22

3-
{% include copy-clipboard.html %}
3+
{% include_cached copy-clipboard.html %}
44
~~~ sql
5-
> CREATE TABLE users (id INT PRIMARY KEY);
5+
CREATE TABLE users (id INT PRIMARY KEY);
66
~~~
77

8-
{% include copy-clipboard.html %}
8+
{% include_cached copy-clipboard.html %}
99
~~~ sql
10-
> PREPARE prep1 AS SELECT * FROM users;
10+
PREPARE prep1 AS SELECT * FROM users;
1111
~~~
1212

13-
{% include copy-clipboard.html %}
13+
{% include_cached copy-clipboard.html %}
1414
~~~ sql
15-
> ALTER TABLE users ADD COLUMN name STRING;
15+
ALTER TABLE users ADD COLUMN name STRING;
1616
~~~
1717

18-
{% include copy-clipboard.html %}
18+
{% include_cached copy-clipboard.html %}
1919
~~~ sql
20-
> INSERT INTO users VALUES (1, 'Max Roach');
20+
INSERT INTO users VALUES (1, 'Max Roach');
2121
~~~
2222

23-
{% include copy-clipboard.html %}
23+
{% include_cached copy-clipboard.html %}
2424
~~~ sql
25-
> EXECUTE prep1;
25+
EXECUTE prep1;
2626
~~~
2727

2828
~~~
29-
id | name
30-
-----+------------
31-
1 | Max Roach
32-
(1 row)
29+
ERROR: cached plan must not change result type
30+
SQLSTATE: 0A000
3331
~~~
3432

35-
It's therefore recommended to **not** use `SELECT *` in queries that will be repeated, via prepared statements or otherwise.
36-
37-
Also, a prepared [`INSERT`](insert.html), [`UPSERT`](upsert.html), or [`DELETE`](delete.html) statement acts inconsistently when the schema of the table being written to is changed before the prepared statement is executed:
38-
39-
- If the number of columns has increased, the prepared statement returns an error but nonetheless writes the data.
40-
- If the number of columns remains the same but the types have changed, the prepared statement writes the data and does not return an error.
33+
It's therefore recommended to explicitly list result columns instead of using `SELECT *` in prepared statements, when possible.
Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,33 @@
1-
When the schema of a table targeted by a prepared statement changes before the prepared statement is executed, CockroachDB allows the prepared statement to return results based on the changed table schema, for example:
1+
When the schema of a table targeted by a prepared statement changes after the prepared statement is created, future executions of the prepared statement could result in an error. For example, adding a column to a table referenced in a prepared statement with a `SELECT *` clause will result in an error:
22

33
{% include_cached copy-clipboard.html %}
44
~~~ sql
5-
> CREATE TABLE users (id INT PRIMARY KEY);
5+
CREATE TABLE users (id INT PRIMARY KEY);
66
~~~
77

88
{% include_cached copy-clipboard.html %}
99
~~~ sql
10-
> PREPARE prep1 AS SELECT * FROM users;
10+
PREPARE prep1 AS SELECT * FROM users;
1111
~~~
1212

1313
{% include_cached copy-clipboard.html %}
1414
~~~ sql
15-
> ALTER TABLE users ADD COLUMN name STRING;
15+
ALTER TABLE users ADD COLUMN name STRING;
1616
~~~
1717

1818
{% include_cached copy-clipboard.html %}
1919
~~~ sql
20-
> INSERT INTO users VALUES (1, 'Max Roach');
20+
INSERT INTO users VALUES (1, 'Max Roach');
2121
~~~
2222

2323
{% include_cached copy-clipboard.html %}
2424
~~~ sql
25-
> EXECUTE prep1;
25+
EXECUTE prep1;
2626
~~~
2727

2828
~~~
29-
id | name
30-
-----+------------
31-
1 | Max Roach
32-
(1 row)
29+
ERROR: cached plan must not change result type
30+
SQLSTATE: 0A000
3331
~~~
3432

35-
It's therefore recommended to **not** use `SELECT *` in queries that will be repeated, via prepared statements or otherwise.
36-
37-
Also, a prepared [`INSERT`](insert.html), [`UPSERT`](upsert.html), or [`DELETE`](delete.html) statement acts inconsistently when the schema of the table being written to is changed before the prepared statement is executed:
38-
39-
- If the number of columns has increased, the prepared statement returns an error but nonetheless writes the data.
40-
- If the number of columns remains the same but the types have changed, the prepared statement writes the data and does not return an error.
33+
It's therefore recommended to explicitly list result columns instead of using `SELECT *` in prepared statements, when possible.

0 commit comments

Comments
 (0)