We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug The mssql dialect improperly quotes object (e.g., table/column) names containing ']' characters.
Expected behavior The dialect should escape ']' characters as ']]' like the T-SQL function QUOTENAMES does.
QUOTENAMES
To Reproduce
meta = sa.MetaData() table_name = "colo[u]r" tbl = sa.Table(table_name, meta, sa.Column("id", sa.Integer)) meta.create_all(engine)
Error
sqlalchemy.exc.ProgrammingError: (pyodbc.ProgrammingError) ('42000', "[42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near 'r'. (102) (SQLExecDirectW)") [SQL: CREATE TABLE [colo[u]r] ( id INTEGER NULL ) ]
The text was updated successfully, but these errors were encountered:
Gord Thompson has proposed a fix for this issue in the master branch:
Fix mssql dialect escaping object names containing ']' https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2097
Sorry, something went wrong.
Gord Thompson has proposed a fix for this issue in the rel_1_3 branch:
Fix mssql dialect escaping object names containing ']' https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2098
547e959
Fix mssql dialect escaping object names containing ']'
1fc759d
Fixes: #5467 Change-Id: I054ec219717ba62847a9daf1214e215dd6b70633 (cherry picked from commit 547e959)
gordthompson
No branches or pull requests
Describe the bug
The mssql dialect improperly quotes object (e.g., table/column) names containing ']' characters.
Expected behavior
The dialect should escape ']' characters as ']]' like the T-SQL function
QUOTENAMES
does.To Reproduce
Error
The text was updated successfully, but these errors were encountered: