diff options
author | ndparker <ndparker@users.noreply.github.com> | 2014-09-24 00:13:40 +0200 |
---|---|---|
committer | ndparker <ndparker@users.noreply.github.com> | 2014-10-05 00:54:09 +0200 |
commit | 00018f0748a2eac323248c5d80c28a127907344a (patch) | |
tree | 1b0ce2f321f7951b1992224526fe08f7b60e18b2 /lib/sqlalchemy/dialects/postgresql/base.py | |
parent | 360477cc3af826b5056039b9a19ec3ecb2b94ede (diff) | |
download | sqlalchemy-pr/141.tar.gz |
specialize schema reflection warningspr/141
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 14 |
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] |