On Tue, Jan 6, 2009 at 12:14 AM, Ian Kelly <ian.g.ke...@gmail.com> wrote:
> On Mon, Jan 5, 2009 at 9:21 AM, Alex Gaynor <alex.gay...@gmail.com> wrote:
>> The SQL command not properly ended appears to be the result of an annotate
>> call followed by a call to aggregate().  I don't have a clue what causes
>> that as I've used Oracle in my life :) .
>
> I'll take a look at the queries tomorrow and see if I can straighten them out.

The "ORA-00972: identifier is too long" error is caused by the column
alias names not being truncated to an acceptable length
("book__publisher__num_awards__min" in this case).  The call to
perform the truncation is django.db.backends.util.truncate_name(alias,
connection.ops.max_name_length()).

The "ORA-00923: FROM keyword not found where expected" is caused by
one of the column alias names being an unquoted keyword ("number" in
this case).  Quoting the column alias names with
connection.ops.quote_name(alias) will fix it.

The "ORA-00933: SQL command not properly ended" errors are caused by
queries of the form "SELECT foo FROM (SELECT bar) AS subquery".  The
"AS" keyword needs to be removed, because Oracle doesn't accept it for
subquery aliases.

I'll run the full Oracle test suite and see if anything else pops up.

Ian

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

Reply via email to