From: | "Dean Gibson (DB Administrator)" <postgresql4(at)ultimeth(dot)com> |
---|---|
To: | pgsql-sql <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: What does "merge-joinable join conditions" mean ???? |
Date: | 2006-01-15 23:31:40 |
Message-ID: | 43CADB5C.3020302@ultimeth.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Gibson (DB Administrator) | 2006-01-15 23:47:56 | Re: What does "merge-joinable join conditions" mean ???? |
Previous Message | Tom Lane | 2006-01-15 23:21:53 | Re: What does "merge-joinable join conditions" mean ???? |