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: challenging constraint situation - how do I make it


  • From: Kenneth Downs <ken(at)secdat(dot)com>
  • To: Alban Hertroys <alban(at)magproductions(dot)nl>
  • Cc: Harald Armin Massa <haraldarminmassa(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
  • Subject: Re: challenging constraint situation - how do I make it
  • Date: Wed, 24 May 2006 07:00:04 -0400
  • Message-id: <44743CB4(dot)5050600(at)secdat(dot)com>

Alban Hertroys wrote:


When encountering this problem I usually wonder why there isn't a data type that can store a timestamp and can be used to create a UNIQUE INDEX over it's values. That'd be wonderful.
Well, maybe one day I'll actually have time to create one...

I tried this at trigger level. The real bear is in the fact that there are two columns, not one. It is trivial to write an exclusion constraint that disallows overlapping (including nested) values. What was hard was determining the meta-data structure, how do you have two columns that are sometimes treated as one and sometimes as two?

Possible, but devilish in the details.
begin:vcard
fn:Kenneth  Downs
n:Downs;Kenneth 
email;internet:ken(at)secdat(dot)com
tel;work:631-689-7200
tel;fax:631-689-0527
tel;cell:631-379-0010
x-mozilla-html:FALSE
version:2.1
end:vcard



Home | Main Index | Thread Index

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