Re: Idea: Avoid JOINs by using path expressions to follow FKs

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Idea: Avoid JOINs by using path expressions to follow FKs
Дата
Msg-id 20210327211106.GA2507@alvherre.pgsql
обсуждение исходный текст
Ответ на Idea: Avoid JOINs by using path expressions to follow FKs  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Idea: Avoid JOINs by using path expressions to follow FKs  ("Joel Jacobson" <joel@compiler.org>)
Re: Idea: Avoid JOINs by using path expressions to follow FKs  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On 2021-Mar-27, Joel Jacobson wrote:

> If there would be multiple foreign keys on a column we try to follow,
> the query planner would throw an error forcing the user to use explicit joins instead.

This seems pretty dangerous -- you just have to create one more FK, and
suddenly a query that worked perfectly fine, now starts throwing errors
because it's now ambiguous.  Feels a bit like JOIN NATURAL, which many
people discourage because of this problem.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
Si no sabes adonde vas, es muy probable que acabes en otra parte.



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

Предыдущее
От: Pantelis Theodosiou
Дата:
Сообщение: Re: Idea: Avoid JOINs by using path expressions to follow FKs
Следующее
От: Mark Wong
Дата:
Сообщение: Re: [GSoC] Question about Add functionality to pg_top and supporting tools