public inbox for [email protected]  
help / color / mirror / Atom feed
From: Joel Jacobson <[email protected]>
To: Laurenz Albe <[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: Mon, 01 Jun 2026 22:36:36 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Mon, Jun 1, 2026, at 22:06, Joel Jacobson wrote:
> -- Rejected: the view is the PK side and lacks row coverage.
> SELECT *
> FROM orders AS o
> JOIN active_customers AS ac FOR KEY (id) <- o (customer_id);
> ERROR:  key join from referencing relation o to referenced relation ac 
> cannot be proven
> ERROR:  key join from referencing relation o to referenced relation ac 
> cannot be proven
> LINE 3: JOIN active_customers AS ac FOR KEY (id) <- o (customer_id);
>                                     ^
> DETAIL:  Not every o (customer_id) value can be proven to have a 
> matching ac row. Referenced relation ac is filtered before this key 
> join. The relevant operation occurs inside view public.active_customers.

Ops, that extra ERROR: line was a mistake, sorry about that.

The corresponding subsection has now also been fixed in the web version:
https://keyjoin.org/#sec7.4.13

/Joel






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