Re: unique index on variable time

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: unique index on variable time
Дата
Msg-id 20060416165025.GA33828@winnie.fuhr.org
обсуждение исходный текст
Ответ на unique index on variable time  ("pgsql-general@list.coretech.ro" <pgsql-general@list.coretech.ro>)
Ответы Re: unique index on variable time  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sun, Apr 16, 2006 at 07:07:11PM +0300, pgsql-general@list.coretech.ro wrote:
> I am interested to know if I can define an unique index on a timestamp
> column to reject values within one hour.

Last month I posted an idea for enforcing unique constraints on
date ranges by using a composite type and a custom comparison
operator:

http://archives.postgresql.org/pgsql-sql/2006-03/msg00055.php

The warning about the code being only minimally tested still stands
but maybe it'll give you some ideas.

--
Michael Fuhr

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

Предыдущее
От: "pgsql-general@list.coretech.ro"
Дата:
Сообщение: unique index on variable time
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: inet value validation