summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sqlalchemy/dialects/oracle/base.py2
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py2
-rw-r--r--lib/sqlalchemy/dialects/sybase/base.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/dialects/oracle/base.py b/lib/sqlalchemy/dialects/oracle/base.py
index 493bf362f..3af308cbb 100644
--- a/lib/sqlalchemy/dialects/oracle/base.py
+++ b/lib/sqlalchemy/dialects/oracle/base.py
@@ -900,7 +900,7 @@ class OracleIdentifierPreparer(compiler.IdentifierPreparer):
)
def format_savepoint(self, savepoint):
- name = re.sub(r'^_+', '', savepoint.ident)
+ name = savepoint.ident.lstrip('_')
return super(
OracleIdentifierPreparer, self).format_savepoint(savepoint, name)
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 1bc4409f2..e25ec9aea 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -2085,7 +2085,7 @@ class PGDialect(default.DefaultDialect):
attype = re.sub(r'\(.*\)', '', format_type)
# strip '[]' from integer[], etc.
- attype = re.sub(r'\[\]', '', attype)
+ attype = attype.replace('[]', '')
nullable = not notnull
is_array = format_type.endswith('[]')
diff --git a/lib/sqlalchemy/dialects/sybase/base.py b/lib/sqlalchemy/dialects/sybase/base.py
index fba13c722..fc1792550 100644
--- a/lib/sqlalchemy/dialects/sybase/base.py
+++ b/lib/sqlalchemy/dialects/sybase/base.py
@@ -552,7 +552,7 @@ class SybaseDialect(default.DefaultDialect):
coltype = sqltypes.NULLTYPE
if default:
- default = re.sub("DEFAULT", "", default).strip()
+ default = default.replace("DEFAULT", "").strip()
default = re.sub("^'(.*)'$", lambda m: m.group(1), default)
else:
default = None