Re: so, does this overlap or not...? - fencepost question on overlaps()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: so, does this overlap or not...? - fencepost question on overlaps()
Дата
Msg-id 24445.1275575283@sss.pgh.pa.us
обсуждение исходный текст
Ответ на so, does this overlap or not...? - fencepost question on overlaps()  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Ответы Re: so, does this overlap or not...? - fencepost question on overlaps()  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Список pgsql-general
Frank van Vugt <ftm.van.vugt@foxi.nl> writes:
> This doesn't seem to make sense to me, can someone explain the rationale
> behind it?

The rationale is "do what the SQL spec says" ;-)

What the spec says is

              ( S1 > S2 AND NOT ( S1 >= T2 AND T1 >= T2 ) )
              OR
              ( S2 > S1 AND NOT ( S2 >= T1 AND T2 >= T1 ) )
              OR
              ( S1 = S2 AND ( T1 <> T2 OR T1 = T2 ) )

I seem to recall a previous discussion in the PG lists where we
reverse-engineered a plausible explanation of what the standards
committee had in mind when they wrote this, but I don't have time
right now to go looking for it.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Lock issues with partitioned table
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Auto-partitioning in COPY