theres a ticket in Trac to support quoted identifiers.  its not
implemented yet, but it will involve you putting a flag "quote=True" on
your Table definition (since i dont want impose the quoting stuff on
people unless people specifically want it).



Aaron Spike wrote:
> In my first few minutes experimenting with SQLAlchemy I ran into the
> following error. I've been staring at it for a day now and I think I
> understand what is going on. The PostgreSQL schema I'm working with
> makes use of delimited or quoted identifiers. SQLAlchemy seems to be
> having dificulties parsing these identifiers out of the queries it
> generates. I haven't looked into the code yet. Do any other PostgreSQL
> users have experience dealing with delimited identifiers in SQLAlchemy?
>
> Aaron Spike
>
> [2006-07-29 07:27:08,854] [engine]: SELECT "vPersons"."Person_ID",
> "vPersons"."Person_LastFirstM", "vPersons"."Person_LastName"
> FROM "vPersons"
> WHERE "vPersons"."Person_LastName" = :"vPersons"_"Person_LastName"
> [2006-07-29 07:27:08,854] [engine]: {'"vPersons"_"Person_LastName"':
> 'Spike'}
> [2006-07-29 07:27:08,854] [engine]: ROLLBACK
> Traceback (most recent call last):
>   File "C:\src\test\dbmap.py", line 13, in ?
>     print
> persons_table.select(persons_table.c.last=='Spike').execute().fetchall()
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 514, in execute
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 468, in
> execute_using
>   File "build\bdist.win32\egg\sqlalchemy\sql.py", line 375, in execute
>   File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 467, in
> execute_compiled
>   File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 284, in
> execute_compiled
>   File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 280, in
> proxy
>   File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 319, in
> _execute_raw
>   File "build\bdist.win32\egg\sqlalchemy\engine\base.py", line 338, in
> _execute
> sqlalchemy.exceptions.SQLError: (ProgrammingError) parser: parse error
> at or near ":" at character 148
>  'SELECT "vPersons"."Person_ID", "vPersons"."Person_LastFirstM",
> "vPersons"."Person_LastName" \nFROM "vPersons" \nWHERE
> "vPersons"."Person_La
> stName" = :"vPersons"_"Person_LastName"'
> {'"vPersons"_"Person_LastName"': 'Spike'}
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Sqlalchemy-users mailing list
> Sqlalchemy-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sqlalchemy-users mailing list
Sqlalchemy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to