From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: pgsql-sql@postgresql.org
Subject: diary constraints
Date: Tue, 23 Aug 2005 09:33:58 +0100
Message-ID: <200508230933.59043.gary.stainburn@ringways.co.uk> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gary.stainburn@ringways.co.uk
Subject: Re: diary constraints
In-Reply-To: <200508230933.59043.gary.stainburn@ringways.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox