Re: postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread j_syk
> You can control the order of how nulls sort with pgsql (at least, 8.3 > and above) by appending 'NULLS FIRST' or 'NULLS LAST' to the 'ORDER > BY' clause of a select query. Good to know. I am using 8.4, I may look into adding the order by into a .extra() call. Thanks Due to the urgency, I went w

Re: postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread Tom Evans
On Mon, Sep 26, 2011 at 3:12 PM, j_syk wrote: > Hello- > On Friday afternoon I migrated a project from sqlite to postgres. > Everything went smoothly and I was able to go home for the weekend and > be happy. Yay. > This morning I was informed that the sort order is different. I have a > DateField

Re: postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread j_syk
Found a similar post http://groups.google.com/group/django-users/browse_thread/thread/4edf7a4a94c65c17/2dfbc193845d4383?lnk=gst&q=sort+null#2dfbc193845d4383 The main difference is that mine is a DateField. So I can't just make it 0 instead of None. -- You received this message because you are su

postgres- can nulls be first when sorting in asc order?

2011-09-26 Thread j_syk
Hello- On Friday afternoon I migrated a project from sqlite to postgres. Everything went smoothly and I was able to go home for the weekend and be happy. Yay. This morning I was informed that the sort order is different. I have a DateField for a due date that is set as not required, however leaving