Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b2ded0

Browse files
committed
Fix for an Issue #577
1 parent 437278e commit 5b2ded0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2948,7 +2948,7 @@ def safeSQLIdentificatorNaming(name, isTable=False):
29482948
retVal = "\"%s\"" % retVal.strip("\"")
29492949
elif Backend.getIdentifiedDbms() in (DBMS.ORACLE,):
29502950
retVal = "\"%s\"" % retVal.strip("\"").upper()
2951-
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL,):
2951+
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL,) and not re.match(r"\A\w+\Z", retVal, re.U):
29522952
retVal = "[%s]" % retVal.strip("[]")
29532953

29542954
if _ and DEFAULT_MSSQL_SCHEMA not in retVal and '.' not in re.sub(r"\[[^]]+\]", "", retVal):

0 commit comments

Comments
 (0)