Re: plpgsql arrays
От | Tom Lane |
---|---|
Тема | Re: plpgsql arrays |
Дата | |
Msg-id | 28595.1238767442@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: plpgsql arrays (Matthew Wakeling <matthew@flymine.org>) |
Ответы |
Re: plpgsql arrays
Re: plpgsql arrays |
Список | pgsql-performance |
Matthew Wakeling <matthew@flymine.org> writes: > On Fri, 3 Apr 2009, Robert Haas wrote: >> Why not just use SQL to do the join? > Because the merge condition is: > WHERE l1.start <= l2.end AND l2.start <= l1.end > and merge joins in postgres only currently cope with the case where the > merge condition is an equals relationship. > Oh, hang on, I think I saw something in the docs about what conditions can > be used in a merge... No, you got it right the first time. I was about to suggest that maybe you could make it work by recasting the problem as equality on an interval datatype, but the problem is that this is not equality but "overlaps". And you can't cheat and call it equality, because it's not transitive. I don't actually believe that a standard merge join algorithm will work with an intransitive join condition ... regards, tom lane
В списке pgsql-performance по дате отправления: