Search Postgresql Archives

Re: exclusion constraint with overlapping timestamps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-09-08 at 15:48 -0400, A.M. wrote:
> I am experimenting with exclusion constraints via Depesz's excellent
> introduction here:
> http://www.depesz.com/index.php/2010/01/03/waiting-for-8-5-exclusion-constraints/
> 
> In the example, he uses non-overlapping (day) dates for hotel booking.
> In my case, I would like to use the same datatype but allow for
> timestamps to overlap on the boundaries, so that I can store a
> continuous timeline of state.
> 

Consider using the PERIOD datatype instead:

     http://pgfoundry.org/projects/temporal

See an example here:

     http://thoughts.j-davis.com/2009/11/08/temporal-keys-part-2/

Regards,
	Jeff Davis


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux