Hi, I'm trying to create the following index (on PostgreSQL) with SQLAlchemy 0.8:
CREATE INDEX doc_idx ON xmltab (CAST((xpath('//@bla', doc))[1] AS TEXT)); (where doc is a column of type XML) I got this far: Index("doc_idx", cast((func.xpath('//@bla', xmlTable.c.doc))[1], TEXT)) but get the error: Traceback (most recent call last): File "xmltests.py", line 146, in <module> idx = Index("doc_idx", cast((func.xpath('//@bla', xmlTable.c.doc))[1], TEXT)) File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/operators.py", line 320, in __getitem__ File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/expression.py", line 2311, in operate File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/operators.py", line 320, in __getitem__ File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/expression.py", line 1994, in operate File "build/bdist.linux-x86_64/egg/sqlalchemy/sql/expression.py", line 2148, in _unsupported_impl NotImplementedError: Operator 'getitem' is not supported on this expression It seems getitem should be allowed since the xpath expression returns an array of nodes (and it is fine in PostgreSQL). Any idea what I am doing wrong and how to fix it? Thanks, Christian -- 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/groups/opt_out.