Re: [Sqlalchemy-tickets] [sqlalchemy] #2742: look into using inline=true for bindparam() inside of
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-06-05 14:41:03
|
#2742: look into using inline=true for bindparam() inside of DDL sequences
------------------------------+----------------------------------
Reporter: andreycizov | Owner: zzzeek
Type: defect | Status: new
Priority: medium | Milestone: 0.8.xx
Component: schema | Severity: minor - half an hour
Resolution: | Keywords:
Progress State: in queue |
------------------------------+----------------------------------
Changes (by zzzeek):
* milestone: => 0.8.xx
* status_field: awaiting triage => in queue
* component: cextensions => schema
* severity: no triage selected yet => minor - half an hour
Comment:
well you can't use a bound parameter in an Index. The system here should
tell the compiler to convert bound parameters to literals, so that can be
fixed, but in the meantime just use text() or literal_column() (btw this
index still returns an error for me on PG 9.1.4):
{{{
Index('heuristic',
(text("1")) / (Foo.a + Foo.b))
}}}
error:
{{{
ProgrammingError: (ProgrammingError) syntax error at or near "1"
LINE 1: CREATE INDEX heuristic ON foos (1 / (a + b))
}}}
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2742#comment:2>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|