pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ludwig Lim <lud_nowhere_man@yahoo.com>
Cc: PostgreSQL Mailing List <pgsql-sql@postgresql.org>
Subject: Re: Question on OUTER JOINS.
Date: Sat, 28 Jun 2003 02:03:03 -0400
Message-ID: <16131.1056780183@sss.pgh.pa.us> (raw)
In-Reply-To: <20030628054547.40824.qmail@web80503.mail.yahoo.com>
References: <20030628054547.40824.qmail@web80503.mail.yahoo.com>

Ludwig Lim <lud_nowhere_man@yahoo.com> writes:
>   1) Is the ON clause of an OUTER JOIN always
> evaluated first before the WHERE clause?

No; the planner will do whatever it thinks is the most efficient way
(assuming it can prove that the reordering it wants to do won't change
the query result).

>   Is there a way to rewrite the query as a view such
> that one can do:

I'm really not clear on what you want here.  Better example please?

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <16131.1056780183@sss.pgh.pa.us>
Permalink:  ../16131.1056780183@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16131.1056780183@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, lud_nowhere_man@yahoo.com
  Subject: Re: Question on OUTER JOINS.
  In-Reply-To: <16131.1056780183@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