pgchronos 1.0 released

From: Eric Worden <worden(dot)eric(at)gmail(dot)com>
To: PostgreSQL Announce <pgsql-announce(at)postgresql(dot)org>
Subject: pgchronos 1.0 released
Date: 2015-11-05 17:42:27
Message-ID: CAN5pzZhdWvHq_cNjM3qd9HY58drkGk4pWxR5TZ8N4DeQJxgSuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce

PGCHRONOS 1.0 RELEASED
======================

pgchronos is a new Postgresql extension providing sql functions and
operators for performing union, intersection, and difference operations on
sets of daterange and tstzrange types.

As a simple example of a difference operation, imagine a hotel where
frequent customers can earn special member rates during most of the year,
excluding holiday weeks.

Select unnest(
(select array_agg(range) from special_membership_ranges) -
(select array_agg(range) from holiday_exclusion_ranges))
special_booking_ranges;

special_booking_ranges
-------------------------
[2015-01-02,2015-01-06)
[2015-01-07,2015-01-21)
[2015-01-22,2015-01-29)

More typical usage scenarios will be more complex, something like
subtracting student sick date ranges from the same students' course
enrollment date ranges to find exact student attendance date ranges for
some set of students.

These functions were originally developed as part of the ChronosDB
project. That code became half-obsolete when Postgres introduced range
data types in version 9.2. This code is a reimplementation that brings it
current with the latest Postgres versions, and utilizes the native Postgres
range data types. The current project site is <
https://github.com/worden341/pgchronos>.

REQUIREMENTS
============

pgchronos utilizes the range datatypes introduced in Postgresql 9.2,
therefore that is the minimum version you can use with this extension.

LINKS
=====

* https://github.com/worden341/pgchronos
* http://pgxn.org/dist/pgchronos/

Eric Worden

Browse pgsql-announce by date

  From Date Subject
Next Message David Fetter 2015-11-08 23:37:14 == PostgreSQL Weekly News - November 08 2015 ==
Previous Message David Fetter 2015-11-01 23:39:27 == PostgreSQL Weekly News - November 01 2015 ==