Sami Dalouche <skoobi@free.fr> writes:
> So, the version of postgres I use is :
> samokk@samlaptop:~/Desktop $ dpkg -l | grep postgres
> ii postgresql-8.2 8.2.5-1.1
OK. I think you have run afoul of a bug that was introduced in 8.2.5
that causes it not to realize that it can interchange the ordering of
certain outer joins. Is there any chance you can apply the one-line
patch shown here:
http://archives.postgresql.org/pgsql-committers/2007-10/msg00374.php
If rebuilding packages is not to your taste, possibly a down-rev to
8.2.4 would be the easiest solution.
regards, tom lane