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

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from
Open
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 @@ -265,9 +265,11 @@ CREATE ALIAS `my.alias.with.dots` FOR DATABASE `northwind-graph`
CREATE ALIAS `my.composite.database.with.dots`.`my.other.alias.with.dots` FOR DATABASE `northwind-graph`
----


[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`.
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? 🤔

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
Loading