Re: What does "merge-joinable join conditions" mean ????
От | Dean Gibson (DB Administrator) |
---|---|
Тема | Re: What does "merge-joinable join conditions" mean ???? |
Дата | |
Msg-id | 43CADB5C.3020302@ultimeth.com обсуждение исходный текст |
Ответ на | Re: What does "merge-joinable join conditions" mean ???? (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | 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 makesit 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=2943width=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
В списке pgsql-sql по дате отправления: