* Harco de Hilster (harcoh@ATConsultancy.nl) wrote:
> ERROR: FULL JOIN is only supported with merge-joinable join conditions
I'm not a big fan of that error either, honestly.
> select *
> from A
> full outer join B on A.f1 = B.f1 and ((A.ExpTime IS NULL AND B.ExpTime
> IS NULL) OR (A.ModTime <= B.ExpTime AND (B.ExpTime > A.ExpTime OR
> B.ExpTime IS NULL)))
What about:
inner join
union all
left join
union all
right join
? You'd need to add a couple where clauses to make the left/right joins
only return rows not returned by the inner join. Honestly, that setup
is pretty ugly though and you might consider trying to figure out a way
to clean it up.
It'd be nice if Postgres would basically just do this for you. :/
Perhaps one of the other folks can explain why it doesn't just work.
Enjoy,
Stephen