﻿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
18514	Creating sequences fails with Oracle 01741 error on custom table name with quotes	obmuc	nobody	"Using a custom table name with Oracle, and entering the full-qualified oracle schema + table name with quotes, is resulting in an Oracle 17141 error when running syncdb: ""illegal zero-length identifier"". The all-knowing Google indicates this is due to an empty string ("""") being passed to Oracle.

Example Model: 

{{{
class MyModel(models.Model):
	a_field = models.CharField(max_length=1000, blank=True, null=True)
	
	class Meta:
		db_table = u'""ORACLE_SCHEMA"".""DESIRED_TABLE_NAME""'
}}}

Executing the syncdb management command to create that table results in the following:

{{{
$ ./manage.py syncdb
Creating table ""ORACLE_SCHEMA"".""DESIRED_TABLE_NAME""
Traceback (most recent call last):
  File ""./manage.py"", line 11, in <module>
    execute_manager(settings)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/core/management/__init__.py"", line 438, in execute_manager
    utility.execute()
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/core/management/__init__.py"", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/core/management/base.py"", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/core/management/base.py"", line 220, in execute
    output = self.handle(*args, **options)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/core/management/base.py"", line 351, in handle
    return self.handle_noargs(**options)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/core/management/commands/syncdb.py"", line 99, in handle_noargs
    cursor.execute(statement)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/db/backends/util.py"", line 15, in execute
    return self.cursor.execute(sql, params)
  File ""[ intentionally obscured ]/lib/python2.6/site-packages/django/db/backends/oracle/base.py"", line 595, in execute
    return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-01741: illegal zero-length identifier
ORA-06512: at line 8
}}}

The table is otherwise usable with the Django ORM once created - just errors on attempt to create via syncdb."	Bug	closed	Database layer (models, ORM)	1.2	Normal	duplicate	oracle		Accepted	0	0	0	0	0	0
