Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-09 Thread Ian Kelly
2011/3/9 Łukasz Rekucki : > It's probably messy in general case, but maybe we can try emulating > this in this particular case. Using an ordinary DISTINCT in a subquery > seems to solve the issue: > >    base_query = >

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-09 Thread Łukasz Rekucki
On 8 March 2011 18:29, Ian Kelly wrote: > 2011/3/8 Łukasz Rekucki : >> It's also supported by Oracle, AFAIK. > > It is not, although it can be emulated using an analytic query. Should have done more searching, thanks for correcting me. >I tried adding

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-09 Thread Michael Radziej
Hi, I'm currently not familiar with the current code base--still catching up--but wouldn't it make sense to select distinct on the primary key? Kind regards Michael -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-08 Thread Ian Kelly
2011/3/8 Łukasz Rekucki : > It's also supported by Oracle, AFAIK. It is not, although it can be emulated using an analytic query. I tried adding this to the patch in #6422 some time ago, but I found that the structure of an analytic query was going to be rather complicated to

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-08 Thread Russell Keith-Magee
On Sat, Mar 5, 2011 at 1:29 PM, Karen Tracey wrote: > On Fri, Mar 4, 2011 at 10:24 AM, Viktor Kojouharov > wrote: >> >> I'm testing my software with the new rc1 release of django 1.3, and I came >> onto a particularly nasty problem. >> I have a model

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-08 Thread Łukasz Rekucki
2011/3/8 Łukasz Rekucki : > On 8 March 2011 14:01, Florian Apolloner wrote: >> Hi, >> >> On Mar 5, 9:30 am, akaariai wrote: >>> on(primary_key) id, val1, ... from table order by primary_key this >>> would solve the problem. >> >> Is

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-08 Thread Łukasz Rekucki
On 8 March 2011 14:01, Florian Apolloner wrote: > Hi, > > On Mar 5, 9:30 am, akaariai wrote: >> on(primary_key) id, val1, ... from table order by primary_key this >> would solve the problem. > > Is "DISTINCT ON" part of the SQL standard at all? >

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-08 Thread Florian Apolloner
Hi, On Mar 5, 9:30 am, akaariai wrote: > on(primary_key) id, val1, ... from table order by primary_key this > would solve the problem. Is "DISTINCT ON" part of the SQL standard at all? Cheers, Florian -- You received this message because you are subscribed to the Google

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-05 Thread Viktor Kojouharov
I've created a ticket for this http://code.djangoproject.com/ticket/15559 Also, if someone else is stumbling on this problem, I went around it by providing a custom QuerySet class for my method, which has an overridden distinct method, that returns itself. -- You received this message

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-05 Thread akaariai
On Mar 5, 7:29 am, Karen Tracey wrote: > It's probably best if you open a ticket in trac > (http://code.djangoproject.com/newticket) for this. I can't think offhand how > to solve both the problem that changeset fixed and the one you are > encountering > If Django ORM

Re: the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-04 Thread Karen Tracey
On Fri, Mar 4, 2011 at 10:24 AM, Viktor Kojouharov wrote: > > I'm testing my software with the new rc1 release of django 1.3, and I came > onto a particularly nasty problem. > I have a model which uses a Postgresql 'point' type, for which I've defined > a field as: >

the new SELECT DISTINCT query in 1.3 rc1, and how to turn it off

2011-03-04 Thread Viktor Kojouharov
Hello, I'm testing my software with the new rc1 release of django 1.3, and I came onto a particularly nasty problem. I have a model which uses a Postgresql 'point' type, for which I've defined a field as: http://dpaste.com/472467/ I also have another model, which references this one with a