On 5/27/05, Mario Weilguni wrote: > I've quite some trouble with the overlaps function: > SELECT overlaps('9.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, > '9.6.2005'::date); > returns true (these are german timestamps dd.mm.yyyy) > > SELECT overlaps('8.6.2005'::date, '9.6.2005'::date, '9.6.2005'::date, > '9.6.2005'::date); > returns false > > Is this a bug or a (quite strange) feature?
It is consistent with the SQL standard: <quote> <overlaps predicate> uses the operator OVERLAPS to determine whether or not two chronological periods overlap in time. A chronological period is specified aither as a pair of datetimes (starting and ending) or as a starting datetime and an interval. If the length of the period is greater than 0 (zero), then the period consists of all points of time greater than or equal to the lower endpoint, and less than the upper endpoint. If the length of the period is equal to 0 (zero), then the period consists of a single point in time, the lower endpoint. Two periods overlap if they have at least one point in common. </quote> ISO/IEC 9075-2:2003 4.6 Datetimes and intervals. For those who prefer BNF look at 8.13 <overlaps predicate> in said standard. Jochem ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly