Changes between Version 4 and Version 5 of Stored Functions and Procedures


Ignore:
Timestamp:
05/13/26 17:49:42 (13 days ago)
Author:
193284
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Stored Functions and Procedures

    v4 v5  
    6161$$ LANGUAGE plpgsql;
    6262</pre>
     63
     64This function does not only compare equal dates. It compares complete timestamp intervals using:
     65
     66{{{
     67#!sql
     68(new_start < existing_end) AND (new_end > existing_start)
     69}}}
     70
     71This condition detects all possible overlap cases:
     72* the new interval starts inside an existing interval
     73* the new interval ends inside an existing interval
     74* the new interval completely contains an existing interval
     75* the existing interval completely contains the new interval
     76* both intervals are exactly the same
     77* intervals that only touch at the boundary are not treated as overlapping
    6378
    6479== 3. is_photographer_available() ==