Re: Idea: Avoid JOINs by using path expressions to follow FKs
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Joel Jacobson <joel@compiler.org>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-03-27T21:11:06Z
Lists: 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.
Commits
-
Clean up generation of default names for constraints, indexes, and serial
- 45616f5bbbb8 8.0.0 cited