Closed GoogleCodeExporter closed 9 years ago
Someone reported a similar bug to the bug tracker of the underlying cx_Oracle
module:
http://sourceforge.net/tracker/index.php?func=detail&aid=1582216&group_id=84168&
atid=571972
It seems that "desc/describe" is a SQL*Plus specific command, so the actual
problem
reported here won't fix. Anyway the error message is wrong, it should be
'ORA-00900:
invalid SQL statement'.
Thanks for your offer to test the Oracle plugin! It will become a builtin
plugin with
the next release (currently it lives in a somewhat experimental place) and I
hope to
add more meta information during a substantial rework of the meta data engine
that's
needed to implement tab-completion (issue36).
Original comment by albrecht.andi
on 1 Apr 2009 at 2:47
Hi
Sorry, I just posted the wrong example: the problems is happening on any table
querying, DESC or SELECT. I haven't investigated any further. Attached is a
screenshot with a SELECT example output.
Original comment by massimil...@gmail.com
on 1 Apr 2009 at 3:05
Attachments:
Ah, ok. The actual problem is that the recent version of the sqlparse included
with
the application return unicode instead of str. It seems that the cx_Oracle
database
backend doesn't like unicode strings and instist on str or None (for whatever
reason)
for statements.
As a workaround you can change cf/backends/__init__.py in execute() the line
self.cursor.execute(self.statement)
to
self.cursor.execute(str(self.statement))
A proper solution would be that the Oracle backend does this conversion before
executing the query (but I currently have no time to have a close look at it).
Original comment by albrecht.andi
on 1 Apr 2009 at 3:27
I've the change suggested: now it works (see attached Schermata-2.png
screenshot),
but only if you omit the ";" at the end of the line: otherwise it reports an
"invalid
charachter" error (see attached Schermata-1.png screenshot)
Original comment by massimil...@gmail.com
on 1 Apr 2009 at 3:58
Attachments:
Committed preparation of statements before execution in r594. Currently that's
only
required for the Oracle backend. The Oracle implementation now converts the
given
statement to str and removes a trailing semicolon if present.
Thanks for reporting and testing! I'm closing this issue now, but feel free to
leave
another comment or file a new issue if other problems occur.
Original comment by albrecht.andi
on 1 Apr 2009 at 7:17
Original issue reported on code.google.com by
massimil...@gmail.com
on 1 Apr 2009 at 9:55