Maybe this will helps: http://www.sqlalchemy.org/docs/reference/dialects/postgresql.html#indexes
On 9 Maj, 20:59, Haron Media <[email protected]> wrote: > I went through SQLAlchemy docs but I'm not sure how to pull this off. > There appears to be no way to create an index on expression using Column > type classes alone, nor via additional table arguments. So my question > is, how can I create an index on expression, for PostgreSQL? I need this > query (and some others, similar) be executed when creating the table > (via paster setup-app .ini): > > CREATE UNIQUE INDEX users_username_idx ON users (lower((username)::text)); > > This is the only way to ensure case insensitive uniqueness of columns. > > Thanks, > > Vlad > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/pylons-discuss?hl=en. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
