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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: unique index on variable time


  • From: Michael Fuhr <mike(at)fuhr(dot)org>
  • To: "pgsql-general(at)list(dot)coretech(dot)ro" <pgsql-general(at)list(dot)coretech(dot)ro>
  • Cc: pgsql-general(at)postgresql(dot)org
  • Subject: Re: unique index on variable time
  • Date: Sun, 16 Apr 2006 10:50:26 -0600
  • Message-id: <20060416165025(dot)GA33828(at)winnie(dot)fuhr(dot)org>

On Sun, Apr 16, 2006 at 07:07:11PM +0300, pgsql-general(at)list(dot)coretech(dot)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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group