sehughes / django-treebeard

Automatically exported from code.google.com/p/django-treebeard
Apache License 2.0
0 stars 0 forks source link

table names need to be quoted for postgresql #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use postgresql as database engine
2. create a class (inheriting from a treebeard class, of course) in a module 
whose name uses
    1 or more capital letters
     like: MyApp.MyMPNode(MP_node)
3. try and use the class, in particular get_descendants_group_count()

What is the expected output? What do you see instead?
Expect:  a group of siblings and the number of descendants in every sibling
      Get: a traceback complaining that table 'myapp_mympnode' does not exist.

Postgresql needs the tablenames quoted with 
   django.db.connection.ops.quote_name(tblName)

grepping through the django/db code, I find that this is done for all the 
backends.

Thanks!
-Carol

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by etmo...@gmail.com on 4 May 2009 at 12:50

GoogleCodeExporter commented 9 years ago

Original comment by gpicon on 14 Jun 2009 at 11:45

GoogleCodeExporter commented 9 years ago
etmomus:

Thanks for this excellent report. I reproduced the problem and I'm about to 
commit a fix.

Original comment by gpicon on 14 Jun 2009 at 12:21

GoogleCodeExporter commented 9 years ago
This issue was closed by r94.

Original comment by gpicon on 14 Jun 2009 at 12:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision f6e79ce4ec.

Original comment by gpicon on 14 Oct 2009 at 3:47