From: | Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | diary constraints |
Date: | 2005-08-23 08:33:58 |
Message-ID: | 200508230933.59043.gary.stainburn@ringways.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi folks
I know this has been discussed in the past, but no amount of keywords
has returned anything from the archives.
I want to create a courtesy car diary diary system where I have a table
containing all of the cortesy cars in the pool, and then an allocation
table which has two timestamps, one for the start date/time and one for
the return date/time.
How do I go about creating constraints on inserts and updates to ensure
that
a) the finish is after the start
b) two allocations for a single vehicle don't overlap.
--
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
From | Date | Subject | |
---|---|---|---|
Next Message | neil.saunders | 2005-08-23 08:57:00 | Re: diary constraints |
Previous Message | Jim C. Nasby | 2005-08-23 00:57:52 | Re: [PHP] Data insert |