On Mon, Aug 27, 2012 at 11:46 AM, EXT-Rothermel, Peter M <Peter.M.Rothermel@xxxxxxxxxx> wrote: > I thought that this was going to be tricky. > > Perhaps I could use rules to populate a shadow table that is like a INNER JOIN of the two tables. This would consolidate the Boolean on the separate table into the same table that holds the time ranges. In version 8.4 I would still need to use explicit locking on this shadow table but in 9.x an exclusion constraint may have a better chance of working. Are you expecting a lot of concurrent activity? If not, your best bet is probably to serialize all writes with an elevated lock. Barring that, you are probably going to have to write pending scheduling activity into a queue and have a subsequent transaction consume the queue and enforce the overlapping rules. Also, it's worth giving a quick shout to the upcoming 9.2 (which is going into release candidate status) range types feature for solving these types of problems. merlin -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general