Hi all,

I'm using the extra() method to add a calculated field to my object:

Table.objects.extra(select={'level':'nlevel(hierarchy)'})

where nlevel is a function defined in my PostgreSQL database.

The problem is that either Django or the driver is quoting the function
instead of inserting it directly at the docs state it should:

SELECT "app_table"."field_name",...,("nlevel(hierarchy)") AS "level"
FROM "app_table"

Notice the quotes around nlevel(hierarchy). Postgres doesn't like this,
and pitches an error. :-)

So, have I missed a setting somewhere to turn off quoting for specific
fields, or is there something else I'm missing?

Thanks in advance,
-scott



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to