Skip site navigation (1) Skip section navigation (2)

Using overlaps()

From: Andrew Perrin - Demography <aperrin(at)demog(dot)berkeley(dot)edu>
To: pgsql-sql(at)postgresql(dot)org
Subject: Using overlaps()
Date: 2000-04-10 23:45:22
Message-ID: Pine.LNX.4.10.10004101643440.10219-100000@famine.DEMOG.Berkeley.EDU (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

The Postgres Book implies that there is a function overlaps() that takes
two pairs of dates and returns true if they overlap.  However, I get an
error trying to use it:

demogdata=> select event_id from event_detail where overlaps
(date_effective, date_expires, '1-mar-2000'::datetime , now()::datetime);
ERROR:  No such function 'overlaps' with the specified attributes
demogdata=> select event_id from event_detail where (date_effective,
date_expires) overlaps ('1-mar-2000'::date , now()::date);
ERROR:  parser: parse error at or near "overlaps"

Any advice?


Andrew J. Perrin - aperrin(at)demog(dot)berkeley(dot)edu - NT/Unix Admin/Support
Department of Demography    -    University of California at Berkeley
2232 Piedmont Avenue #2120  -    Berkeley, California, 94720-2120 USA --------------------------SEIU1199


pgsql-sql by date

Next:From: Bruce MomjianDate: 2000-04-11 00:44:01
Subject: Re: Using overlaps()
Previous:From: Tom LaneDate: 2000-04-10 23:35:12
Subject: Re: Finding primary keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group