Re: diary constraints

From: PFC <lists(at)boutiquenumerique(dot)com>
To: "Gary Stainburn" <gary(dot)stainburn(at)ringways(dot)co(dot)uk>, pgsql-sql(at)postgresql(dot)org
Subject: Re: diary constraints
Date: 2005-08-23 09:06:42
Message-ID: op.svyd9g1mth1vuj@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


> a) the finish is after the start

well, finish > start

> b) two allocations for a single vehicle don't overlap.

this one is a bit tricky !

- Check that there is no allocation in the table whose time period start,
end includes either the start of the end of the reservation to insert, and
that the time period of the reservation to insert does not contain either
the start or end of any reservation in the table.

This is 4 selects, playing with order by limit 1 and indexes, it will be
fast.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2005-08-23 09:12:38 Re: diary constraints
Previous Message Gnanavel S 2005-08-23 09:00:10 Re: diary constraints