Deprecate relying on the current implementation of the database object name parser #6592
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, when building DDL, the DBAL quotes only the identifies that are explicitly quoted or are reserved keywords. The reason for not quoting all of them is that the databases that respect the SQL-92 standard normalize the case of unquoted identifiers but preserve the case of the quoted ones. If the DBAL quoted all identifiers, then an object containing lower-case letters in its name would have to be referenced as quoted in SQL (e.g,
"id"
) on Oracle and IBM DB2. Similarly, a column containing upper-case letters would have to be quoted on PostgreSQL.The current design has the following major downsides:
ID
but unquoted (and implicitly quoted) "select" will be created as lower-caseselect
.Additionally, the current object name parser is rudimentary and exposes various issue (see #4357 for examples).
While the solution proposed in #4772 is hard to pull off at once, this change should be a manageable first step. The implementation is drafted in #6589.
The logic is the following:
The upgrade path:
The overhead of using two parsers should be insignificant since schema management is usually not a hot path.