On Apr 28, 2011, at 12:45 AM, Sirko Schroeder wrote:

> I have a problem with oracle column names that are oracle reserved
> words (http://download.oracle.com/docs/cd/B19306_01/em.102/b40103/
> app_oracle_reserved_words.htm). I read through the archive and found:
> https://groups.google.com/group/sqlalchemy/browse_thread/thread/5e2699594c73fe1c/41f35436c9149818?hl=en&lnk=gst&q=oracle+reserved+words#41f35436c9149818
> 
> sadly I have the same problem with the current quoting of oracle
> reserved words as bindvars, i.e. I get something
> like this:
> 
> ---8<---
> 
> DatabaseError: (DatabaseError) ORA-01036: illegal variable name/number
> 'UPDATE <footable> SET "Group"=:"Group"' {u'"Group"': u'Undefined'}
> 
> ---8<---
> 
> The workaround with a different local key works, but is  IMHO not
> ideal.
> Is there any other way to get around this issue? I noticed that an
> unquoted bindvar does work on this oracle db.

One suggestion I'd make is to use case insensitive names on the SQLAlchemy 
side, i.e. "group" instead of "Group".   That will reduce how often quoting is 
applied, though not in this case since "group" is a reserved word anyway.

The next issue is, this was a known issue that is fixed in both 0.6.7 and 0.7 
(ticket 2100, unfortunately I had to go through creating a whole test just now 
to figure that out, but there you go).     And, if you name your column  
"group" or "Group", and *not* u"group", or u"Group", i.e. don't specify as 
unicode, it will probably work in older 0.6's too.   






> 
> Kind Regards,
> Sirko
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalchemy@googlegroups.com.
> To unsubscribe from this group, send email to 
> sqlalchemy+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/sqlalchemy?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to