Re: ORDER BY does not work as expected with multiple joins - Mailing list pgsql-sql

From Tom Lane
Subject Re: ORDER BY does not work as expected with multiple joins
Date
Msg-id 25485.1137167776@sss.pgh.pa.us
Whole thread Raw
In response to Re: ORDER BY does not work as expected with multiple joins  (Adam Rosi-Kessel <adam@rosi-kessel.org>)
List pgsql-sql
Adam Rosi-Kessel <adam@rosi-kessel.org> writes:
> But I am curious why you think a LEFT JOIN should be used rather than RIGHT
> JOIN? I think I believe I am getting the desired set of records. When I
> substitute LEFT JOIN for RIGHT JOIN I actually get the same result. Can you
> help me understand under what conditions, in this case, I would obtain a
> different result?

Try some cases where there are IDs in the ID/name table that do not
appear in the linking table, or the other way around.  If you still
like your results in those situations, then it's the right way for you.
        regards, tom lane


pgsql-sql by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: ORDER BY does not work as expected with multiple joins
Next
From: Michael Glaesemann
Date:
Subject: Re: ORDER BY does not work as expected with multiple joins