Re: plpgsql arrays

Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql arrays
Дата
Msg-id 1138.1238770111@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: plpgsql arrays  (Matthew Wakeling)
Ответы Re: plpgsql arrays  (Matthew Wakeling)
Re: plpgsql arrays  (Nathan Boley)
Список pgsql-performance
Дерево обсуждения
plpgsql arrays  (Matthew Wakeling, )
 Re: plpgsql arrays  (Robert Haas, )
  Re: plpgsql arrays  (Matthew Wakeling, )
   Re: plpgsql arrays  (Tom Lane, )
    Re: plpgsql arrays  (Matthew Wakeling, )
     Re: plpgsql arrays  (Tom Lane, )
      Re: plpgsql arrays  (Matthew Wakeling, )
       Re: plpgsql arrays  (Matthew Wakeling, )
       Re: plpgsql arrays  (Tom Lane, )
        Re: plpgsql arrays  (Matthew Wakeling, )
        Re: plpgsql arrays  (Nathan Boley, )
    Re: plpgsql arrays  (Simon Riggs, )
     Re: plpgsql arrays  (Alvaro Herrera, )
     Re: plpgsql arrays  (Tom Lane, )
      Re: plpgsql arrays  (Matthew Wakeling, )
     Re: plpgsql arrays  (Matthew Wakeling, )
      Re: plpgsql arrays  (Robert Haas, )
 Re: plpgsql arrays  (Tom Lane, )
  Re: plpgsql arrays  (Matthew Wakeling, )
   Re: plpgsql arrays  (justin, )
    Re: plpgsql arrays  (Matthew Wakeling, )
     Re: plpgsql arrays  (justin, )
     Re: plpgsql arrays  (Tom Lane, )
      Re: plpgsql arrays  (Matthew Wakeling, )
   Re: plpgsql arrays  (Merlin Moncure, )
    Re: plpgsql arrays  (Tom Lane, )
     Re: plpgsql arrays  (Matthew Wakeling, )
      Re: plpgsql arrays  (Tom Lane, )
 Re: plpgsql arrays  (Merlin Moncure, )
  Re: plpgsql arrays  (Merlin Moncure, )
   Re: plpgsql arrays  (Matthew Wakeling, )
    Re: plpgsql arrays  (Merlin Moncure, )
Matthew Wakeling <> writes:
> On Fri, 3 Apr 2009, Tom Lane wrote:
>> Not unless you have sorted the inputs in some way that has more
>> knowledge than the "equal" operator represents.  Otherwise you can have
>> elements drop out that might still be needed to match to a later
>> left-hand element.

> Of course. You certainly have to choose a sort order that works. Sorting
> by the start field would be sufficient in this case.

Uh, no, it wouldn't.  Visually:

    L1    -------------------------
    L2    -----------
    L3    ---------------------

    R1                   --------

At L2, you'd conclude that you're done matching R1.

Intuitively, it seems like 1-D "overlaps" is a tractable enough
operator that you should be able to make something merge-like
work.  But it's more complicated than I think you realize.

            regards, tom lane

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Question on pgbench output
Следующее
От: David Kerr
Дата:
Сообщение: Re: Question on pgbench output