Re: NATURAL JOINs

Поиск
Список
Период
Сортировка
От Reg Me Please
Тема Re: NATURAL JOINs
Дата
Msg-id 200810151803.26066.regmeplease@gmail.com
обсуждение исходный текст
Ответ на Re: NATURAL JOINs  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: NATURAL JOINs
Список pgsql-general
Il Wednesday 15 October 2008 17:55:03 Tom Lane ha scritto:
> "Richard Broersma" <richard.broersma@gmail.com> writes:
> > For this reason, clients passing natural joins to the server can have
> > dangerous result sets returned with no warning.
>
> Yeah.  A lot of people consider that NATURAL JOIN is simply a bad idea
> and shouldn't be used ever --- it's too easy to shoot yourself in the
> foot with a careless column addition or rename.  Explicitly spelling out
> the join columns with ON or USING is a lot less prone to silent breakage
> after a schema change.
>
>             regards, tom lane

Both are perfectly right, indeed.
Nonetheless, in my opinion a NATURAL JOIN  exploiting the FKs
instead of the column names would be much more helpful and much less error
prone!

As far as I know there is no way to exploit FKs in JOINs, right?

THANKS

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

Предыдущее
От: "Grzegorz Jaśkiewicz"
Дата:
Сообщение: Re: Opptimizing projections containing unused columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Drupal and PostgreSQL - performance issues?