On 3/27/21 5:11 PM, Alvaro Herrera wrote: > 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. >
Maybe. I don't recall ever having seen a column with more than one FK. Is that a common thing? In itself it seems like a bad idea. Not saying I think this suggestion is a good idea, though. We've seen many frameworks that hide joins, and the results are ... less than universally good. If your application programmers don't like using joins, then either a) you should have the DBA create some views for them that contain the joins, or b) you have the wrong application programmers -:) cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com