Re: Improper quoting using extra() in Postgres

2006-06-01 Thread Scott Anderson
Great, thanks Adrian! Works perfectly, and man that was quick. ;-) Regards, -scott On Wed, 2006-05-31 at 23:49 -0500, Adrian Holovaty wrote: > On 5/31/06, Scott Anderson <[EMAIL PROTECTED]> wrote: > > The problem is that either Django or the driver is quoting the function > > instead of

Re: Improper quoting using extra() in Postgres

2006-05-31 Thread Adrian Holovaty
On 5/31/06, Scott Anderson <[EMAIL PROTECTED]> wrote: > 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

Improper quoting using extra() in Postgres

2006-05-31 Thread Scott Anderson
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