]> 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:48:41 +0000 (10:48 -0500)
commitaa50375a9aa72be896a7cf3afbbbec161c7111bd
treec7f9efa34a14a8796c47fd9ab59fd092f7202862
parent2f91dd79310657814ad28b6ef64f91fff7a007c9
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
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