Le 19/09/2012 17:08, Merlin Moncure a écrit :
SELECT * FROM foo LEFT JOIN BAR ON foo.id = bar.id AND bar.col = 'something'; The difference here is that the filtering is now happening at join time where the left join semantics are playing: always return foo and return bar rows if and only if the join condition is met.
Ok, as a rule of thumb, should I put in the where clause only the conditions related to foo and inner joins ? All other (outer) conditions should then go on their respective 'ON' clauses ?
JC -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general