Re: exclusion constraint with overlapping timestamps

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: exclusion constraint with overlapping timestamps
Дата
Msg-id 1283982521.25127.2.camel@jdavis-ux.asterdata.local
обсуждение исходный текст
Ответ на exclusion constraint with overlapping timestamps  ("A.M." <agentm@themactionfaction.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: error while autovacuuming
Следующее
От: Sam Nelson
Дата:
Сообщение: Re: Memory Errors