From 00018f0748a2eac323248c5d80c28a127907344a Mon Sep 17 00:00:00 2001 From: ndparker Date: Wed, 24 Sep 2014 00:13:40 +0200 Subject: specialize schema reflection warnings --- lib/sqlalchemy/dialects/postgresql/base.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/sqlalchemy/dialects/postgresql/base.py') 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] -- cgit v1.2.1