> David Johnston wrote:
> 
>> Bryn wrote:
>> 
>> This means for instance that two time periods with only an endpoint in 
>> common do not overlap.
> 
> A range has two endpoints. The one at the later (end) of the range and the 
> one at the earlier (start).  I suppose rewording it to say “boundary point” 
> in common would avoid the ambiguity in the use of the word “end”.

Thanks, David. And thanks, too, to Tom and to Adrian for your prompt replies.

I see that I should have expressed myself more clearly. I never thought that 
either of the examples that I showed was behaving wrongly. David guessed right: 
I thought that the wording in the doc was confusing and might be improved.

A period (unless it collapses to an instant) is defined by the two moment 
values that bound it. (I’m using “moment” to mean a point in absolute time in a 
way that doesn’t care about the data type.) And when these two moments are 
distinct, one will be earlier than the other.

In plain English, people talk about, say, a relationship starting and (at least 
as often happens) ending. You ask “when did the relationship start and end?” 
Nobody talks about a relationship’s two endpoints. (But maybe they do in a 
different culture with a different language).

In fact, the PG doc reflects this vernacular usage by giving the signature of 
one of the overloads thus:

(start1, end1) OVERLAPS (start2, end2)

So I read “endpoint” in the doc I quoted to mean “either end1 or end2” (and, by 
extension, “startpoint”, if it had been used, to mean “either start1 or start2”.

But the doc wants me to take “endpoint” to mean “either start1, end1, start2, 
or end2”.

Maybe you think that I’m being too fussy. If so, please forgive me.

Certainly, David’s suggestion to use “boundary point” would be easy to 
implement, and would be an improvement. I think that I prefer this:

When the end of one period coincides with the start of the other period, then 
“overlaps” returns “false”. 

because it uses the terms in the same way that they are used in the signature.

Reply via email to