Re: Getting the amount of overlap when using OVERLAPS

From: gregstumph(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting the amount of overlap when using OVERLAPS
Date: 2005-09-23 18:30:24
Message-ID: 1127500224.007782.158330@g49g2000cwa.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I don't think your algorithm for calculating the number of days in the
overlap will work. Picture a scenario where we have one date range that
covers 100 days, and another that covers 10 days, and they overlap by 2
days. Doing "age(<first range>) - age(<second range>)" will return 90
days, not 2 days.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dawid Kuroczko 2005-09-23 18:53:19 Re: How many insert + update should one transaction handle?
Previous Message Roy Souther 2005-09-23 18:26:36 Can not get ODBC to log. Trace is not working.