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

Поиск
Список
Период
Сортировка
От Karsten Hilbert
Тема Re: swap relations to be able to execute a left join
Дата
Msg-id 20051209172544.GD5059@merkur.hilbert.loc
обсуждение исходный текст
Ответ на swap relations to be able to execute a left join  (David Rio Deiros <driodeiros@gmail.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: William
Дата:
Сообщение: Re: Solaris 10 Sun Studio 11 compile error configtest
Следующее
От: William
Дата:
Сообщение: Re: PgSQL 8.1.0 Solaris w/ Sun's cc