public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Joel Jacobson <[email protected]>
To: pgsql-hackers <[email protected]>
Cc: Arne Roland <[email protected]>
Cc: Anders Granlund <[email protected]>
Cc: Andreas Karlsson <[email protected]>
Cc: Vik Fearing <[email protected]>
Subject: Re: Key joins
Date: Fri, 29 May 2026 14:51:23 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Thu, 2026-05-28 at 20:47 +0200, Joel Jacobson wrote:
> This patch implements a new SQL language feature, that we intent to
> submit as a Change Proposal to the WG 3 SQL committee for the next
> meeting in Stockholm in June.  We would greatly appreciate any feedback
> from the community.

Your presentation at the pgconf.dev really convinced me that this is
a useful feature.

I had only one consideration:

> FROM orders o
> LEFT JOIN order_items oi FOR KEY (order_id) -> o (id)

In the spirit of looking more like SQL, how about replacing the
arrows with FROM and TO?

Either

  a JOIN b FOR KEY (col1) TO (col2)

or, slightly more verbose and natural language-like:

  a JOIN b FOR KEY FROM (col1) TO (col2)

And if the arrow points the other way,

  a JOIN b FOR KEY (col1) FROM (col2)

or

  a JOIN b FOR KEY TO (col1) FROM (col2)

Yours,
Laurenz Albe





view thread (26+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Key joins
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox