Skip to content

Commit a9482b6

Browse files
mnd999renetapopova
andauthored
Allow database names to start with a digit (#1952)
We have relaxed the database naming rules to allow a database name to start with a digit. Update docs to reflect this. See also neo-technology/neo4j#28262 --------- Co-authored-by: Reneta Popova <[email protected]>
1 parent 74abc24 commit a9482b6

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

modules/ROOT/pages/configuration/configuration-settings.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ m|+++0+++
812812
|Description
813813
a|Names of the databases allowed on this server; all others are denied. Empty means all are allowed. This configuration can be overridden when enabling the server or altered at runtime without changing this setting. Exclusive with `server.initial_denied_databases`.
814814
|Valid values
815-
a|A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character but not with the name `system`.
815+
a|A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character or number but not with the name `system`.
816816
|Default value
817817
m|++++++
818818
|===
@@ -828,7 +828,7 @@ m|++++++
828828
|Description
829829
a|Names of the databases not allowed on this server. Empty means nothing is denied. This configuration can be overridden when enabling the server or altered at runtime without changing this setting. Exclusive with `server.initial_allowed_databases`.
830830
|Valid values
831-
a|A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character but not with the name `system`.
831+
a|A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character or number but not with the name `system`.
832832
|Default value
833833
m|++++++
834834
|===
@@ -2183,7 +2183,7 @@ Once it is created, the setting is not valid anymore.
21832183

21842184
To set the default database, use the xref:/clustering/databases.adoc#cluster-default-database[`dbms.setDefaultDatabase()`] procedure instead.
21852185
|Valid values
2186-
a|A valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character but not with the name system.
2186+
a|A valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character or number but not with the name system.
21872187
|Default value
21882188
m|+++neo4j+++
21892189
|===
@@ -5001,7 +5001,7 @@ m|+++false+++
50015001
|Description
50025002
a|List of databases for which to prevent write queries. Databases not included in this list maybe read_only anyway depending upon the value of <<config_server.databases.default_to_read_only,server.databases.default_to_read_only>>.
50035003
|Valid values
5004-
a| A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character but not with the name system.
5004+
a| A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character or number but not with the name system.
50055005
|Default value
50065006
m|++++++
50075007
|===
@@ -5017,7 +5017,7 @@ m|++++++
50175017
|Description
50185018
a|List of databases for which to allow write queries. Databases not included in this list will allow write queries anyway, unless <<config_server.databases.default_to_read_only,server.databases.default_to_read_only>> is set to true.
50195019
|Valid values
5020-
a|A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character but not with the name system.
5020+
a|A comma-separated set where each element is a valid database name containing only alphabetic characters, numbers, dots, and dashes with a length between 3 and 63 characters, starting with an alphabetic character or number but not with the name system.
50215021
|Default value
50225022
m|++++++
50235023
|===

modules/ROOT/pages/database-administration/standard-databases/naming-databases.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ See link:{neo4j-docs-base-uri}/cypher-manual/{page-version}/syntax/naming[Cypher
88
Naming rules for databases are as follows:
99

1010
* Length must be between 3 and 63 characters.
11-
* The first character of a name must be an ASCII alphabetic character.
11+
* The first character of a name must be an ASCII alphabetic or numeric character.
12+
Support for database names starting with a numeric character is available from Neo4j 2025.01.
1213
* Subsequent characters must be ASCII alphabetic or numeric characters, dots or dashes; `[a..z][0..9].-`.
1314
* Names cannot end with dots or dashes.
1415
* Names are case-insensitive and normalized to lowercase.
@@ -17,7 +18,7 @@ Naming rules for databases are as follows:
1718
[NOTE]
1819
====
1920
The `-` (dash) and `.` (dot) characters are not legal in Cypher variables.
20-
Names with a `-` in them must be enclosed within backticks.
21+
Names containing a `-` or that begin with a numeric character must be enclosed within backticks.
2122
For example, `CREATE DATABASE ++`main-db`++` is a valid database name.
2223
Database names are the only identifier for which dots do not need to be quoted.
2324
For example `main.db` is a valid database name.

0 commit comments

Comments
 (0)