summaryrefslogtreecommitdiff
path: root/test/dialect/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2009-02-03 00:22:01 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2009-02-03 00:22:01 +0000
commit1c751e3ddb4768b2ba916da9bc1354887077889a (patch)
tree3116b013e3f0dc76329420d5a50436caef3a5bfb /test/dialect/postgres.py
parent76e001d39ece09227e4ca7e4ac0fa075cfc8de57 (diff)
downloadsqlalchemy-1c751e3ddb4768b2ba916da9bc1354887077889a.tar.gz
- PG Index reflection won't fail when an index with
multiple expressions is encountered.
Diffstat (limited to 'test/dialect/postgres.py')
-rw-r--r--test/dialect/postgres.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/dialect/postgres.py b/test/dialect/postgres.py
index 206a28003..4b1ab9178 100644
--- a/test/dialect/postgres.py
+++ b/test/dialect/postgres.py
@@ -631,15 +631,23 @@ class MiscTest(TestBase, AssertsExecutionResults):
m1 = MetaData(testing.db)
t1 = Table('party', m1,
Column('id', String(10), nullable=False),
- Column('name', String(20), index=True)
+ Column('name', String(20), index=True),
+ Column('aname', String(20))
)
m1.create_all()
+
testing.db.execute("""
create index idx1 on party ((id || name))
""", None)
testing.db.execute("""
create unique index idx2 on party (id) where name = 'test'
""", None)
+
+ testing.db.execute("""
+ create index idx3 on party using btree
+ (lower(name::text), lower(aname::text))
+ """)
+
try:
m2 = MetaData(testing.db)
@@ -655,6 +663,7 @@ class MiscTest(TestBase, AssertsExecutionResults):
# Make sure indexes are in the order we expect them in
tmp = [(idx.name, idx) for idx in t2.indexes]
tmp.sort()
+
r1, r2 = [idx[1] for idx in tmp]
assert r1.name == 'idx2'