[Sqlalchemy-tickets] Issue #3174: support text() sent to indexes (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: Mike B. <iss...@bi...> - 2014-08-27 23:44:26
|
New issue 3174: support text() sent to indexes https://bitbucket.org/zzzeek/sqlalchemy/issue/3174/support-text-sent-to-indexes Mike Bayer: this works in general, but fails on at least the Postgresql dialect because it is linking each expression to a column. See https://bitbucket.org/zzzeek/alembic/issue/222/support-functional-indexes-with for how alembic works around this. ``` #!python from sqlalchemy import * from sqlalchemy.schema import CreateIndex from sqlalchemy.dialects import postgresql m = MetaData() t = Table('x', m) idx = Index('foo', text("lower(c)")) idx._set_parent(t) print CreateIndex(idx).compile(dialect=postgresql.dialect()) ``` |