Louis-David Mitterrand <vindex(at)apartia(dot)org> writes:
> Hmm, since 7.1 released we have religiously converted all our joins to
> the new syntax, thinking it more politically correct ;-). But now all
> our beliefs are put into question. Back to old joins, in certain cases.
> Here is the rule of thumb we deduct from your message: only use explicit
> join syntax if a left|right|full join is involved OR if the
> conditional(s) can go into the ON() clause, ELSE use the old join
> syntax.
I don't see that the ON clause has anything to do with it. You must use
the JOIN syntax for any kind of outer join, of course. For an inner
join, the planner currently has a better shot at choosing the right plan
if you don't use JOIN syntax.
See nearby thread for some discussion about tweaking this aspect of the
planner's behavior.
regards, tom lane