On 12/9/05, David Rio Deiros <driodeiros@xxxxxxxxx> wrote: > Hi there, > > 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: > [..select..] > FROM > Artifact_Revisions AR, > Revisions_to_Types RTT, > Artifact_Types AT > LEFT JOIN > Users U > on (U.user_id = AR.principal_user_id) [..where..] > > Apparently, once he swapped the 1st (AR) and the 3rd (AT) relation in > the FROM, the query worked. > [..snip..] > > I am sure there is a good reason why you have to swap the relations > in PostgreSQL. Anyone? > Because PostgreSQL is not broken... What i see in this SELECT is an LEFT JOIN between AT and U (note that the other relations in the FROM are separated by commas so they have nothing to do with LEFT JOIN) and is using a JOIN clause from a relation that has nothing to do with the LEFT JOIN... This is just a bug in MySQL and i see no way to say it's a feature... -- Atentamente, Jaime Casanova (DBA: DataBase Aniquilator ;)