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

Joel Jacobson <joel@compiler.org>

From: "Joel Jacobson" <joel@compiler.org>
To: "Julien Rouhaud" <rjuju123@gmail.com>
Cc: "Isaac Morland" <isaac.morland@gmail.com>, "Vik Fearing" <vik@postgresfriends.org>, "Tom Lane" <tgl@sss.pgh.pa.us>, "Andrew Dunstan" <andrew@dunslane.net>, "Alvaro Herrera" <alvherre@alvh.no-ip.org>, "PostgreSQL Developers" <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-31T19:49:52Z
Lists: pgsql-hackers
On Wed, Mar 31, 2021, at 21:32, Joel Jacobson wrote:
> SELECT DISTINCT customers.company_name
> FROM order_details->products
> JOIN order_details->orders->customers
> WHERE products.product_name = 'Chocolade';

Hm, maybe the operator shouldn't be allowed directly after FROM, but only used with a join:

SELECT DISTINCT customers.company_name
FROM order_details
JOIN order_details->orders->customers
JOIN order_details->products
WHERE products.product_name = 'Chocolade';

/Joel

Commits

  1. Clean up generation of default names for constraints, indexes, and serial