SQLAlchemy's API allows CREATE INDEX via the Index construct: http://docs.sqlalchemy.org/en/rel_0_9/core/constraints.html?highlight=index#indexes
On 6/30/14, 6:21 PM, Phillip Aquilina wrote: > Using postgresql, I have a JSON type column. My understanding from > their docs was that only jsonb columns could have an index created on > them (a feature of postgresql 9.4) but then I found an SO answer > <http://stackoverflow.com/questions/17807030/how-to-create-index-on-json-field-in-postgres-9-3> > that > said otherwise. I haven't had the chance to test it since I'm away > from my dev environment, but the sqlalchemy docs seem to support this > idea > <http://docs.sqlalchemy.org/en/rel_0_9/dialects/postgresql.html?highlight=json#sqlalchemy.dialects.postgresql.JSON>, > mentioning the availability of "Index operations." > > Unless I'm missing something obvious (very possible), it seems like > this can be done through sql, but is there a way to create an index on > a json field through the sqlalchemy api? I can't seem to find a way to > do this. > > Thanks, > Phil > -- > You received this message because you are subscribed to the Google > Groups "sqlalchemy" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to sqlalchemy+unsubscr...@googlegroups.com > <mailto:sqlalchemy+unsubscr...@googlegroups.com>. > To post to this group, send email to sqlalchemy@googlegroups.com > <mailto:sqlalchemy@googlegroups.com>. > Visit this group at http://groups.google.com/group/sqlalchemy. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.