pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Tkach <dmitry@openratings.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Trouble with explicit joins
Date: Thu, 21 Oct 2004 19:36:41 -0400
Message-ID: <41784809.4070009@openratings.com> (raw)
In-Reply-To: <12900.1098401533@sss.pgh.pa.us>
References: <41783BC7.4040207@openratings.com>
	<12900.1098401533@sss.pgh.pa.us>

Tom Lane wrote:

>Dmitry Tkach <dmitry@openratings.com> writes:
>  
>
>>I suppose, this is because the planner takes the order, in which the 
>>tables appear in the explicit joins as some kind of a hint to how I want 
>>that query to be executed,
>>    
>>
>
>It's not a "hint", it's a requirement.  In general, changing the order
>in which outer joins are executed changes the results.
>
>There are some cases in which it is safe to rearrange the order, but
>determining this takes close analysis of the join conditions, and we
>don't (yet) have any code to do that.  So the planner must be
>conservative and take your join order as gospel.
>
>			regards, tom lane
>  
>


Yeah.. that's what I figured.
Are you saying there is no way around it at all? Isn't there a syntax 
supported to write a left join with implicit joins?






view thread (3+ messages)

Message-ID: <41784809.4070009@openratings.com>
Permalink:  ../41784809.4070009@openratings.com/
Also on:    postgresql.org/message-id/41784809.4070009@openratings.com

 · 

reply

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: dmitry@openratings.com, tgl@sss.pgh.pa.us
  Subject: Re: Trouble with explicit joins
  In-Reply-To: <41784809.4070009@openratings.com>

* 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