On Tue, Feb 9, 2010 at 2:08 AM, Mathieu Pillard <diox...@gmail.com> wrote:
>> It may indeed be that the MAX clause is using "mat_foo" instead of the
>> assigned correlation U0. What happens if you paste the two SQLs into a
>> query window in PgAdmin 3 and execute them. If the 1.2 query fails
>> with the same error message, I'd report a bug.
>>
>> If it doesn't fail, it's still a Django issue, but I have no idea what
>> it could be. I'm very new to Django; not new to databases.
>
> Ah, I forgot to mention: it does fail when copy/pasting the query
> django 1.2 generated in psql/pgadmin.
>
> I'm not very familiar with postgres and complex queries like this (and
> I suspect there is a better way of doing what I'm doing) ; it's
> obvious the difference between the 2 queries is what's causing my
> problem, but I have no idea *why*, therefore I haven't reported the
> bug yet. An explanation from a django wizard or a psql ninja would be
> great :-)

>From a Django API perspective, I can't see anything obviously wrong
with your query. Looks like you've found a bug. The fact that the
query rolls out differently between 1.1 and 1.2 is cause for concern.

I have a vague recollection that I've seen something simliar to this
reported recently in Trac, but I can't put my finger on the ticket
number. Please have a quick search around Trac to see if you can find
anything (the ticket should be in the 11000+ range). If you can't,
please open a new ticket and mark it for Milestone 1.2, ORM component.

Thanks,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to