Skip to content

Commit 8d44f62

Browse files
post review edit
1 parent 1b3f808 commit 8d44f62

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

modules/ROOT/pages/queries/select-version.adoc

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ Instead, releases from 2025 onwards will follow a *YYYY.MM* format, beginning wi
1414

1515
Cypher 25 is introduced alongside Neo4j 2025.03 and is the default language for newly created databases running version 2025.03 or later.
1616
However, users running Neo4j version 2025.03 or later can choose to run their queries using the previous version of Cypher: Cypher 5.
17-
If so, Neo4j will use Cypher as it existed at the time of the Neo4j 5.26 long-term support release.
17+
If so, Neo4j will use Cypher as it existed at the time of the Neo4j 5.26 long-term support (LTS) release.
1818

1919
[NOTE]
2020
Databases migrating to Neo4j 2025.03+ from earlier versions will continue to use Cypher 5 as their default language.
2121
To change the default language on such databases, see xref:queries/select-version.adoc#alter-default-cypher-version[Alter the default Cypher version for a database].
22-
See also xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and system upgrades] for information about what default Cypher version is used when upgrading a system.
23-
22+
See also xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and DBMS upgrades] for information about what default Cypher version is used when upgrading a DBMS.
2423

2524
For information about updates to Cypher in different Neo4j versions, see xref:deprecations-additions-removals-compatibility.adoc[].
2625
For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manual/5/introduction/[Cypher 5 Manual].
@@ -30,7 +29,7 @@ For information about Cypher 5, see the link:https://neo4j.com/docs/cypher-manua
3029

3130
To select the Cypher version of a query, prepend it with `CYPHER <language version>`.
3231

33-
Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 5.26 long-term support release.
32+
Selecting `CYPHER 5` ensures that the query will be executed using the language as it existed at the time of the Neo4j 5.26 LTS release.
3433
Any changes introduced after 5.26 will not affect the query.
3534

3635
Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.03 or later.
@@ -120,7 +119,7 @@ Therefore, procedures and functions in Neo4j 2025.03+ and APOC 2025.03+ (both of
120119

121120
For example, APOC 2025.03 removed Cypher 25 support of the procedure `apoc.create.uuids()`, meaning it is not available to queries running Cypher 25.
122121
However, it can still be used on APOC 2025.03 if queries are prepended with `CYPHER 5`, or if the database’s default version is set to `CYPHER 5`.
123-
In this case, Neo4j will use APOC and Cypher as they existed at the time of the 5.26 long-term support (LTS) release.
122+
In this case, Neo4j will use APOC and Cypher as they existed at the time of the 5.26 LTS release.
124123

125124
.Using a procedure removed in Cypher 25 with APOC 2025.03+
126125
[source, cypher]
@@ -146,16 +145,13 @@ RETURN n.name
146145
[[select-default-cypher-version]]
147146
== Select the default Cypher version when creating a database
148147

149-
Databases created on Neo4j 2025.03 or later will have Cypher 25 as their default language.
148+
Databases created on Neo4j 2025.03 or later will have Cypher 25 as their default language (if {neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`] is set to `CYPHER_25` -- see xref:queries/select-version.adoc#config-database-upgrades[Cypher versions, configuration settings, and DBMS upgrades] below).
150149
This is true for the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/#manage-database-systems[system, standard, and composite] Neo4j databases.
151150

152151
To select a different default Cypher version for a database, add `DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/create-databases/[`CREATE DATABASE`] statement.
153152
This can be done on any Neo4j database.
154153

155-
[NOTE]
156-
Selecting a default Cypher version on a database requires the `SET DEFAULT LANGUAGE` privilege.
157-
158-
Selecting `CYPHER 5` as the default database language ensures that every query run on that database uses the language as it existed at the time of the Neo4j 5.26 long-term support release.
154+
Selecting `CYPHER 5` as the default database language ensures that every query run on that database uses the language as it existed at the time of the Neo4j 5.26 LTS release (unless a query is prepended with `CYPHER 25`, which overrides this default).
159155
Any changes introduced after 5.26 will not affect the semantics of the query.
160156

161157
.Create a database with Cypher 5 as the default language
@@ -164,7 +160,7 @@ Any changes introduced after 5.26 will not affect the semantics of the query.
164160
CREATE DATABASE my_database DEFAULT LANGUAGE CYPHER 5
165161
----
166162

167-
Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.03 or later.
163+
Selecting `CYPHER 25` ensures that the query will be executed using the language as it exists in the version of Neo4j that the database is currently running, provided it is on Neo4j 2025.03 or later (unless a query is prepended with `CYPHER 5`, which overrides this default).
168164

169165
.Create a database with Cypher 25 as the default language
170166
[source, cypher]
@@ -178,7 +174,7 @@ CREATE DATABASE my_new_database DEFAULT LANGUAGE CYPHER 25
178174
To alter the default Cypher version on a database, add `SET DEFAULT LANGUAGE <language version>` to the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/alter-databases/[`ALTER DATABASE`] command.
179175

180176
[NOTE]
181-
Selecting a default Cypher version on a database requires the `SET DEFAULT LANGUAGE` privilege.
177+
Selecting a default Cypher version on a database requires the `SET DATABASE DEFAULT LANGUAGE` privilege.
182178

183179
.Set Cypher 5 as the default language on an existing database
184180
[source, cypher]
@@ -203,6 +199,11 @@ The Cypher version of a database can be seen using the link:{neo4j-docs-base-uri
203199
SHOW DATABASES YIELD name, defaultLanguage
204200
----
205201

202+
[NOTE]
203+
`defaultLanguage` is not returned by default.
204+
It can only be returned with `YIELD`.
205+
For more information, see the link:{neo4j-docs-base-uri}/operations-manual/current/database-administration/standard-databases/listing-databases/#_show_databases_output[Operations Manual -> `SHOW DATABASES` output].
206+
206207
.Result
207208
[role="queryresult",options="header,footer",cols="2*<m"]
208209
|===
@@ -216,11 +217,11 @@ SHOW DATABASES YIELD name, defaultLanguage
216217
|===
217218

218219
[[config-database-upgrades]]
219-
== Cypher versions, configuration settings, and system upgrades
220+
== Cypher versions, configuration settings, and DBMS upgrades
220221

221-
Changing the Cypher version of a database can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`].
222+
Changing the Cypher version of new databases can also be done with the setting link:{neo4j-docs-base-uri}/operations-manual/current/configuration/configuration-settings/#config_db.query.default_language[`config_db.query.default_language`].
222223
This setting determines the default language for new databases where it has not been specified as part of a `CREATE` or `ALTER` database command.
223-
For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a system.
224+
For example, `config_db.query.default_language=CYPHER_25` will set Cypher 25 as the default language for a DBMS.
224225
For more information about using configuration settings, see the link:{neo4j-docs-base-uri}/operations-manual/current/configuration/[Operations Manual -> Configuration].
225226

226227
The table below outlines which Cypher version is assigned to databases in different upgrade or installation scenarios:
@@ -229,21 +230,21 @@ The table below outlines which Cypher version is assigned to databases in differ
229230
|===
230231
| Scenario | `db.query.default_language` | Databases
231232

232-
| *Standard system upgrade to Neo4j 2025.03+*
233+
| *Standard DBMS upgrade to Neo4j 2025.03+*
233234
| Unset
234-
| *Existing system database:* `CYPHER 5` +
235+
| *Existing DBMS database:* `CYPHER 5` +
235236
*Existing user databases:* `CYPHER 5` +
236237
*New user databases default:* `CYPHER 5`
237238

238-
| *Custom system upgrade to Neo4j 2025.03+*
239-
| Manually set to `CYPHER 25` by administrator
240-
| *Existing system database:* `CYPHER 5` +
239+
| *Custom DBMS upgrade to Neo4j 2025.03+*
240+
| Manually set to `CYPHER_25` by administrator
241+
| *Existing DBMS database:* `CYPHER 5` +
241242
*Existing user databases:* `CYPHER 5` +
242243
*New user databases default:* `CYPHER 25`
243244

244245
| *New installation of Neo4j 2025.03+*
245-
| Set to `CYPHER 25`
246-
| *New system database:* `CYPHER 25` +
246+
| Set to `CYPHER_25`
247+
| *New DBMS database:* `CYPHER 25` +
247248
*New user databases default:* `CYPHER 25`
248249

249250
|===

0 commit comments

Comments
 (0)