[sqlalchemy] Feature request - indexes on arbitrary expressions with postgresql

2011-06-21 Thread Filip Zyzniewski - Tefnet
Hi, I got an idea today and thought that maybe SQLAlchemy could support that (copy at http://ideone.com/t42G4 ): == # Fails with Python-2.7.0 and SQLAlchemy-0.7.1 import sqlalchemy import sqlalchemy.ext.declarative Base =

Re: [sqlalchemy] Feature request - indexes on arbitrary expressions with postgresql

2011-06-21 Thread Michael Bayer
sure probably, just compile the expression through the dialect and its fine On Jun 21, 2011, at 3:28 PM, Filip Zyzniewski - Tefnet wrote: Hi, I got an idea today and thought that maybe SQLAlchemy could support that (copy at http://ideone.com/t42G4 ):

Re: [sqlalchemy] Feature request - indexes on arbitrary expressions with postgresql

2011-06-21 Thread Filip Zyzniewski - Tefnet
Dnia 2011-06-21, wto o godzinie 15:34 -0400, Michael Bayer pisze: sure probably, just compile the expression through the dialect and its fine Would you like me to try to come up with a patch for that? Do you think that column_property could have an optional 'index' keyword argument for this

Re: [sqlalchemy] Feature request - indexes on arbitrary expressions with postgresql

2011-06-21 Thread Michael Bayer
On Jun 21, 2011, at 3:52 PM, Filip Zyzniewski - Tefnet wrote: Dnia 2011-06-21, wto o godzinie 15:34 -0400, Michael Bayer pisze: sure probably, just compile the expression through the dialect and its fine Would you like me to try to come up with a patch for that? Do you think that

Re: [sqlalchemy] Feature request - indexes on arbitrary expressions with postgresql

2011-06-21 Thread Michael Bayer
also note you can do this stuff without a patch with the @compiles decorator, if you just need to get something done. you'd redefine compilation for CreateIndex. On Jun 21, 2011, at 3:55 PM, Michael Bayer wrote: On Jun 21, 2011, at 3:52 PM, Filip Zyzniewski - Tefnet wrote: Dnia

Re: [sqlalchemy] Feature request - indexes on arbitrary expressions with postgresql

2011-06-21 Thread Michael Bayer
On Jun 21, 2011, at 5:02 PM, Filip Zyzniewski - Tefnet wrote: Dnia 2011-06-21, wto o godzinie 15:58 -0400, Michael Bayer pisze: also note you can do this stuff without a patch with the @compiles decorator, if you just need to get something done. you'd redefine compilation for CreateIndex.