summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index b9a0d461b..fe256a249 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -2282,8 +2282,10 @@ class PGDialect(default.DefaultDialect):
if is_array:
coltype = ARRAY(coltype)
else:
- util.warn("Did not recognize type '%s' of column '%s'" %
- (attype, name))
+ util.warn(exc.SAUnknownTypeReflectionWarning(
+ "Did not recognize type '%s' of column '%s'" %
+ (attype, name)
+ ))
coltype = sqltypes.NULLTYPE
# adjust the default value
autoincrement = False
@@ -2505,17 +2507,17 @@ class PGDialect(default.DefaultDialect):
if expr:
if idx_name != sv_idx_name:
- util.warn(
+ util.warn(exc.SAUnsupportedIndexReflectionWarning(
"Skipped unsupported reflection of "
"expression-based index %s"
- % idx_name)
+ % idx_name))
sv_idx_name = idx_name
continue
if prd and not idx_name == sv_idx_name:
- util.warn(
+ util.warn(exc.SAIncompleteIndexReflectionWarning(
"Predicate of partial index %s ignored during reflection"
- % idx_name)
+ % idx_name))
sv_idx_name = idx_name
index = indexes[idx_name]