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
AR.artifact_id,
AT.type_nm,
AR.title,
U.dept,
FROM
Artifact_Revisions AR,
Revisions_to_Types RTT,
Artifact_Types AT
LEFT JOIN
Users U
on (U.user_id = AR.principal_user_id)
WHERE
AR.revision_id = RTT.revision_id
AND RTT.type_id = AT.type_id
AND AR.revision_id = 28403;
Apparently, once he swapped the 1st (AR) and the 3rd (AT) relation in
the FROM, the query worked.
He took the opportunity to tell how much he doesn't like PostgreSQL and
how much he loves mysql. Apparently, he told me (I didn't confirm it)
in mysql you wouldn't need to swap the order of the relations
to execute the query.
I am sure there is a good reason why you have to swap the relations
in PostgreSQL. Anyone?
Thanks,
David