Skip to content

Commit 8728ba8

Browse files
committed
Allow database names to start with a digit
We have relaxed the database naming rules to allow a database name to start with a digit. Update docs to reflect this.
1 parent f2d9bbb commit 8728ba8

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,8 @@ 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.
816+
Database naming rules are described in xref:database-administration/standard-databases/naming-databases.adoc[Naming rules for databases]
816817
|Default value
817818
m|++++++
818819
|===
@@ -828,7 +829,8 @@ m|++++++
828829
|Description
829830
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`.
830831
|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`.
832+
a|A comma-separated set where each element is a valid database name.
833+
Database naming rules are described in xref:database-administration/standard-databases/naming-databases.adoc[Naming rules for databases]
832834
|Default value
833835
m|++++++
834836
|===
@@ -2183,7 +2185,8 @@ Once it is created, the setting is not valid anymore.
21832185

21842186
To set the default database, use the xref:/clustering/databases.adoc#cluster-default-database[`dbms.setDefaultDatabase()`] procedure instead.
21852187
|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.
2188+
a|A valid database name.
2189+
Database naming rules are described in xref:database-administration/standard-databases/naming-databases.adoc[Naming rules for databases]
21872190
|Default value
21882191
m|+++neo4j+++
21892192
|===
@@ -4993,7 +4996,8 @@ m|+++false+++
49934996
|Description
49944997
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>>.
49954998
|Valid values
4996-
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.
4999+
a| A comma-separated set where each element is a valid database name.
5000+
Database naming rules are described in xref:database-administration/standard-databases/naming-databases.adoc[Naming rules for databases]
49975001
|Default value
49985002
m|++++++
49995003
|===
@@ -5009,7 +5013,8 @@ m|++++++
50095013
|Description
50105014
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.
50115015
|Valid values
5012-
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.
5016+
a|A comma-separated set where each element is a valid database name.
5017+
Database naming rules are described in xref:database-administration/standard-databases/naming-databases.adoc[Naming rules for databases]
50135018
|Default value
50145019
m|++++++
50155020
|===

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 was added in 2025.1.
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 tha 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 escaped.
2324
For example `main.db` is a valid database name.

0 commit comments

Comments
 (0)