Search Postgresql Archives

Re: swap relations to be able to execute a left join

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 09, 2005 at 09:16:15AM -0800, David Rio Deiros wrote:

> The other day, a coworker who loves mysql was complaining to me because
> he had a hard time to find out why this query didn't work on PostgreSQL:
...
>     FROM
>         Artifact_Revisions AR,
>         Revisions_to_Types RTT,
>         Artifact_Types AT
>     LEFT JOIN
>         Users U
>         on (U.user_id = AR.principal_user_id)
...
> Apparently, once he swapped the 1st (AR) and the 3rd (AT) relation in
> the FROM, the query worked.
...
> I am sure there is a good reason why you have to swap the relations
> in PostgreSQL. Anyone?

I should think his query is joining something other than
what he *thinks* it does...

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux