summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r--lib/sqlalchemy/databases/postgres.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py
index 155b478af..8caadfaf8 100644
--- a/lib/sqlalchemy/databases/postgres.py
+++ b/lib/sqlalchemy/databases/postgres.py
@@ -638,10 +638,11 @@ class PGDialect(default.DefaultDialect):
for row in c.fetchall():
idx_name, unique, expr, prd, col = row
- if expr and not idx_name == sv_idx_name:
- util.warn(
- "Skipped unsupported reflection of expression-based index %s"
- % idx_name)
+ if expr:
+ if not idx_name == sv_idx_name:
+ util.warn(
+ "Skipped unsupported reflection of expression-based index %s"
+ % idx_name)
sv_idx_name = idx_name
continue
if prd and not idx_name == sv_idx_name: