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: | 2006-05-24 11:00:04 |
Message-ID: | 44743CB4.5050600@secdat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
Attachment | Content-Type | Size |
---|---|---|
ken.vcf | text/x-vcard | 186 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Ivan Zolotukhin | 2006-05-24 11:13:50 | Re: Clearing out old idle connections |
Previous Message | Csaba Nagy | 2006-05-24 10:30:31 | Re: allow LIMIT in UPDATE and DELETE |