Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wU9Nj-000yep-0X for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Jun 2026 20:37:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wU9Ni-00BA1q-0B for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Jun 2026 20:37:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wU9Nh-00BA1h-1i for pgsql-hackers@lists.postgresql.org; Mon, 01 Jun 2026 20:37:05 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wU9Ne-00000000j91-2MI5 for pgsql-hackers@postgresql.org; Mon, 01 Jun 2026 20:37:05 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id DC8C87A00D8; Mon, 1 Jun 2026 16:36:58 -0400 (EDT) Received: from phl-imap-08 ([10.202.2.84]) by phl-compute-05.internal (MEProxy); Mon, 01 Jun 2026 16:36:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=compiler.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1780346218; x=1780432618; bh=BlTsj6GbhUDQLlNBpCaHSyyD3xcG+9/hXLS8Q+1pS5A=; b= a4RsdJHo1M3OJ3h7W/+Q/u8cEIHZLs3q8ouU6SBXZqSYXJIJynkoTcamBCnKX2hd QGuV4Zado3FkFSJJBEmitigU82rr4JVvXvI1Tq7FmYDKa1KMuf27Z2NmIMxH9JPw plMcXmHZVloXQo89Pqq78NYp6jONmwME7a2vedxaN49tLnYx9rmulECCh55qePfl Sd8dS4vrjuscmkKN3ZL+F0XlrkLX1BeatDXfd3A1rRR77XCpCUwwpt+48PdtQp8K aIOoat0sTm9tkdfmFzAZQ6wxkbIqBJgschSwy4lLgDDBzaaZvvs16yeQszG+ubQz xd02UjcnnCxUDnjEpnckgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1780346218; x= 1780432618; bh=BlTsj6GbhUDQLlNBpCaHSyyD3xcG+9/hXLS8Q+1pS5A=; b=U MEC2B6rsQUkNjBYrTtDCqS7Btzl9VG6mbRRI9kwSADSgBbC0AHs0TnBGJrC6fKnq n7OGnvW05Smr01OJOLKenHA3s3glAhmymtMpQnHmuUuOTXh1r4IkzKDfzQpTFHuP 7s5zfqXxG0kp6lfh3SXV4RGkF8QuAmHEQx+6Am64wsEckM5Rqz07fGZ5UoDB/tBa jC5cSSqHxqYrWuXAA80Q3gccD7iJWUvHkAdObgLG2LQ3qSKnwIMzkOkZoFGpHnPQ DniQt5TO59/nq/wD22DCsGbBawOKhGLRrw6pO3dnj6OLiFXEwSRXz1yJ7aTPXgI8 51WO6lLu+2XPa11wP+0VQ== X-ME-Sender: X-ME-Proxy-Cause: dmFkZTGm9dj7VkNoMEG+y3ziN6HZBF4IT8CZbpgCJPTNJqiQ+eBGuhmmyZZGx0kexGW8Kx UQO9qUxU07sZ6Stf00taFQetqX2w7vJQk63TUNnyz9P1kopWBrV6dqrOf+J/FF1XclWYg4 MtB2JungbvN9vKzjcmG9ogjApesJgAjLWuw7qK1jz+k3qND4IsqVrFBzm6HTmh9xNaWamk hSteL5f0s4UBhmGUuUePRFLLcltY1yRL6RzHXCI+XBsgOAOPeU+dL2StEbbKCpNQMycSUw RtKNng09Opa613j6mDTV6XJXosoy3sxcDDNnhf0/728UE9tZO8uKKMKgxf8+0ny5q6rPbU 2I5xItY5h1pAKNYw40k8z9TQWlzRHAtdMxVUoPs9IzwyiSrR1WmYrIoClGwiW6RXalQbkk 8J8xTftL2l/nlqECRei2z81zTV8yn8k6EBzG20A3eQUA5GZ3p4bzhl7xVIl3Ae1tzg4fX0 nx/wXXfY7pwxUEwVwAlZI3Bn5Dl5aEwNq/7AJPX1c3s7RNFpOvbvuyJQhKASMCB3VwQfae AVvn+mifigHnlXQo2A4J4JmG1jQ2S8msa52Z7oJYR3CiMVwkEtKvOeXb2kjBDkk62Xphtd OESQxOWj8OQuR/VLeRU3xRmLKlo6/owPe5heDQI9tq/Qq3kCvlqsCLKOXfrg X-ME-Proxy: Feedback-ID: ic6394509:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id CD44C2CE1D5B; Mon, 1 Jun 2026 16:36:57 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: AN_Vy_h1VtK3 Date: Mon, 01 Jun 2026 22:36:36 +0200 From: "Joel Jacobson" To: "Laurenz Albe" , pgsql-hackers Cc: "Arne Roland" , "Anders Granlund" , "Andreas Karlsson" , "Vik Fearing" Message-Id: In-Reply-To: <9ac96604-8112-4750-b0ca-a6ab41d51d31@app.fastmail.com> References: <00c30670-64e1-4c30-a349-784426d333df@app.fastmail.com> <264e69aed5a2fdd93ad555dff96daeabc5c35724.camel@cybertec.at> <2ac20bea-4130-4cf3-8e13-ea7c6d062296@app.fastmail.com> <348b4bd1d4215d475952b7f5527a092a1491a2c1.camel@cybertec.at> <4a34b3e4-fa4c-446d-beb6-45ccac536086@app.fastmail.com> <9ac96604-8112-4750-b0ca-a6ab41d51d31@app.fastmail.com> Subject: Re: Key joins Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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