From: | William Leite Araújo <william(dot)bh(at)gmail(dot)com> |
---|---|
To: | Andrus <eetasoft(at)online(dot)ee> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Why overlaps is not working |
Date: | 2006-11-09 14:15:19 |
Message-ID: | bc63ad820611090615j63f1dfadt500343cef6fa7959@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2006/11/9, Andrus <eetasoft(at)online(dot)ee>:
>
> > They're adjacent, they don't overlap. Check the documentation on
> OVERLAPS,
> > I'm sure it's explicit about whether it is inclusive or exclusive (the
> > latter apparently).
>
> 8.2 doc does not explain term overlap. It only says:
>
> "This expression yields true when two time periods (defined by their
> endpoints) overlap"
>
> >> How to make overlaps to return correct result?
> >
> > select 1 where ('2006-10-30'::date, '9999-12-31'::date) OVERLAPS
> > ('2006-10-16'::DATE, '2006-10-31':: DATE);
>
> In real queries I have column names and parameters instead of data
> constants.
> The only way it seems to replace OVERLAPS operator with AND, OR, <=
> operators.
>
> Is it so ?
>
> Andrus.
Maybe:
('2006-10-16'::DATE BETWEEN '2006-10-30'::date AND '9999-12-31'::date)
OR
('2006-10-31'::DATE BETWEEN '2006-10-30'::date AND '9999-12-31'::date)
--
William Leite Araújo
From | Date | Subject | |
---|---|---|---|
Next Message | Luca Ferrari | 2006-11-09 14:31:41 | cannot connect anymore from a remote host |
Previous Message | Andrus | 2006-11-09 14:08:39 | Re: Why overlaps is not working |