On Wed, Jul 31, 2013 at 6:54 AM, Daniele Procida <[email protected]> wrote:
> On Tue, Jul 30, 2013, Andre Terra <[email protected]> wrote: > > >As for the reasons for disallowing negative indexes, dcramer's comment in > >the ticket makes it clear: there is no way to infer what the last item in > a > >query would be, except if you order it descendingly. For what is worth, > >production code should never rely on any kind of indexing that's not > >accompanied by an explicit order-by clause, as the default ordering is > >unrealiable -- at least in PostgreSQL[2], and I assume in other vendors as > >well[3]. > > By "an explicit order-by clause" I presume you include the "ordering" > attribute on the model? Indeed. I include in that definition anything that causes an ORDER BY clause to be inserted in the final SQL query. Cheers, AT -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. For more options, visit https://groups.google.com/groups/opt_out.
