From: Dean Gibson (DB Administrator) <postgresql4@ultimeth.com>
To: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: What does "merge-joinable join conditions" mean ????
Date: Sun, 15 Jan 2006 15:31:40 -0800
Message-ID: <43CADB5C.3020302@ultimeth.com> (raw)
In-Reply-To: <24299.1137367313@sss.pgh.pa.us>
References: <43CAAFA6.6050001@ultimeth.com>
<20060115215448.GA30809@winnie.fuhr.org>
<43CACC78.7090107@ultimeth.com>
<24299.1137367313@sss.pgh.pa.us>
On 2006-01-15 15:21, Tom Lane wrote:
> Really? The FULL JOIN condition using ~ is the source of the failure, and I'd be quite surprised if changing WHERE makes it work.
>
Works fine:
EXPLAIN SELECT count(*) FROM "Extra" FULL JOIN "GeoRestrict" ON
callsign ~ pattern WHERE geo_region =
4;
QUERY
PLAN
---------------------------------------------------------------------------------
Aggregate (cost=1934.02..1934.02 rows=1 width=0)
-> Nested Loop Left Join (cost=1.18..1926.66 rows=2943 width=0)
Join Filter: ("outer".callsign ~ ("inner".pattern)::text)
-> Seq Scan on "Extra" (cost=0.00..866.00 rows=2943 width=10)
Filter: (geo_region = 4)
-> Materialize (cost=1.18..1.34 rows=16 width=7)
-> Seq Scan on "GeoRestrict" (cost=0.00..1.16 rows=16
width=7)
Note that this used to be just a LEFT JOIN (which also worked), but
today I wanted to include rows from "GeoRestrict" that had nulls for the
left-hand-side of the query, so I changed the LEFT JOIN to a FULL JOIN
(that worked), and then attempted to add a condition to restrict which
rows were included from "GeoRestrict", and that gave the error.
-- Dean
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: pgsql-sql@postgresql.org
Cc: postgresql4@ultimeth.com
Subject: Re: What does "merge-joinable join conditions" mean ????
In-Reply-To: <43CADB5C.3020302@ultimeth.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox