﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7140	Errors in escaping fieldnames in Oracle	herwin@…	Matt Boersma	"According to the comments it's better to have your fieldnames in oracle quoted, but in our case this yielded to errors because the databasename had to be included in the tablename, which means all parts (database, table, field) have to be quoted seperately. The following snippet was the solution in our case (but I'm not sure if this always works, I'm no oracle expert)

{{{
--- db/backends/oracle/base.py     (revision 7510)
+++ db/backends/oracle/base.py     (working copy)
@@ -109,6 +109,7 @@
         # We simplify things by making Oracle identifiers always uppercase.
         if not name.startswith('""') and not name.endswith('""'):
             name = '""%s""' % util.truncate_name(name.upper(), self.max_name_length())
+            name = name.replace('.', '"".""')
         return name.upper()

     def random_function_sql(self):
}}}"	Bug	closed	Database layer (models, ORM)	dev	Normal	wontfix	qsrf-cleanup oracle, quote, escape	herwin@… Erin Kelly	Accepted	1	0	1	0	0	0
