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

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Julien Rouhaud" <rjuju123(at)gmail(dot)com>
Cc: "Isaac Morland" <isaac(dot)morland(at)gmail(dot)com>, "Vik Fearing" <vik(at)postgresfriends(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "PostgreSQL Developers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Idea: Avoid JOINs by using path expressions to follow FKs
Date: 2021-03-31 19:49:52
Message-ID: 2bf3bf1f-287c-469d-b546-e50e831bd60c@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2021-03-31 20:05:23 Re: multi-install PostgresNode fails with older postgres versions
Previous Message Andres Freund 2021-03-31 19:49:26 Re: Crash in record_type_typmod_compare