]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Run bracket interpretation for reflection
authorShan <shan224@gmail.com>
Sun, 22 Jan 2023 16:19:11 +0000 (11:19 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Jan 2023 15:49:28 +0000 (10:49 -0500)
commit102114accc5a7caf76629c4c2ab108ddbfcbe81a
tree59383fc93c69adcf939b25a3aba5b3b73e00eab5
parent2a53f70eeed0c39ff13e0c57086443e8714c8142
Run bracket interpretation for reflection

Fixed bug where a schema name given with brackets, but no dots inside the
name, for parameters such as :paramref:`_schema.Table.schema` would not be
interpreted within the context of the SQL Server dialect's documented
behavior of interpreting explicit brackets as token delimiters, first added
in 1.2 for #2626, when referring to the schema name in reflection
operations. The original assumption for #2626's behavior was that the
special interpretation of brackets was only significant if dots were
present, however in practice, the brackets are not included as part of the
identifier name for all SQL rendering operations since these are not valid
characters within regular or delimited identifiers.  Pull request courtesy
Shan.

Fixes: #9133
Closes: #9134
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9134
Pull-request-sha: 5dac87c82cd3063dd8e50f0075c7c00330be6439

Change-Id: I7a507bc38d75a04ffcb7e920298775baae22c6d1
(cherry picked from commit aa50375a9aa72be896a7cf3afbbbec161c7111bd)
doc/build/changelog/unreleased_14/9133.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
test/dialect/mssql/test_compiler.py
test/dialect/mssql/test_reflection.py