From: Tom Lane <tgl@sss.pgh.pa.us>
To: Adam Rosi-Kessel <adam@rosi-kessel.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: ORDER BY does not work as expected with multiple joins
Date: Fri, 13 Jan 2006 10:56:16 -0500
Message-ID: <25485.1137167776@sss.pgh.pa.us> (raw)
In-Reply-To: <43C7C3E2.1030205@rosi-kessel.org>
References: <43C7BA12.90103@rosi-kessel.org>
<25011.1137164168@sss.pgh.pa.us>
<43C7C3E2.1030205@rosi-kessel.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, adam@rosi-kessel.org
Subject: Re: ORDER BY does not work as expected with multiple joins
In-Reply-To: <25485.1137167776@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox