On 10/26/07, brian <[EMAIL PROTECTED]> wrote:
>
>
> Pat Maddox wrote:
> > On 10/26/07, brian <[EMAIL PROTECTED]> wrote:
> >
> >>>
> >>
> >>
> >>SELECT * FROM posts ORDER BY root_id, id;
> >>
> >>brian
> >>
> >>---------------------------(end of broadcast)---------------------------
> >>TIP 4: Have you searched our list archives?
> >>
> >>               http://archives.postgresql.org/
> >>
> >
> >
> > Okay, but what if I want to order by created_at?
> >
> > btw created_at is a timestamp, I just wrote '4pm' to make it a bit
> > easier to read.
> >
>
> SELECT * FROM posts ORDER BY created_a, root_id, id;

That doesn't work because it just sorts by created_at, and then if two
records are the same it goes to root_id.  That's not what I want.

Pat

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to