Skip to content

Dots in database name are no longer deprecated. #2452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For a description of all the returned columns of this command, and for ways in w

Both local and remote database aliases can be part of a xref::database-administration/composite-databases/concepts.adoc[composite database].

The database alias is made of two parts, separated by a dot: the namespace and the alias name.
The database alias consists of two parts, separated by a dot: the namespace and the alias name.

The namespace must be the name of the composite database.

Expand Down Expand Up @@ -266,9 +266,13 @@ CREATE ALIAS `my.composite.database.with.dots`.`my.other.alias.with.dots` FOR DA
----


[role=label--deprecated]
=== Single dots and local database aliases

[NOTE]
====
As of Neo4j 5.26.9, this feature is no longer deprecated.
====

There is a special case for local database aliases with a single dot without any existing composite database.
If a composite database `some` exists, the query below will create a database alias named `alias` within the composite database `some`.
If no such database exists, however, the same query will instead create a database alias named `some.alias`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ Naming rules for databases are as follows:
The `-` (dash) and `.` (dot) characters are not legal in Cypher variables.
Names with a `-` in them must be enclosed within backticks.
For example, `CREATE DATABASE ++`main-db`++` is a valid database name.
Database names are the only identifier for which dots do not need to be quoted.
For example `main.db` is a valid database name.
Comment on lines -22 to -23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't these two make sense to keep? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the sentence which was also removed from the 2025.x docs, so I followed the pattern here.

However, this behavior is deprecated due to the difficulty of determining if a dot is part of the database name or a delimiter for a database alias in a composite database.
Using dots in database names is not recommended, as it makes it difficult to determine if a dot is part of the database name or a delimiter for a database alias in a composite database.
====

It is possible to create an alias to refer to an existing database to avoid these restrictions.
Expand Down