logged this as http://www.sqlalchemy.org/trac/attachment/ticket/2749


On Jun 6, 2013, at 10:27 PM, Ryan Kelly <rpkell...@gmail.com> wrote:

> Function names in SQL can contain pretty much anything, e.g.:
> 
> =# create function "A Bug?"(integer) returns integer as $$ select $1; $$ 
> language sql;
> CREATE FUNCTION
> 
> But when attempting to use the function from SQLAlchemy:
> 
> from sqlalchemy.sql.expression import func
> bug = getattr(func, "A Bug?")(1)
> session.query(bug).all()
> 
> ProgrammingError: (ProgrammingError) syntax error at or near "?"
> LINE 1: SELECT A Bug?(1) AS "A Bug?_1"
> 'SELECT A Bug?(%(A Bug?_2)s) AS "A Bug?_1"' {'A Bug?_2': 1}
> 
> -Ryan P. Kelly
> 
> -- 
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> <quote_function_names.patch>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to