From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Aaron Bono <postgresql@aranya.com>
Cc: Michael Glaesemann <grzm@seespotcode.net>
Cc: General Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: Alternative to Select in table check constraint
Date: Sun, 2 Jul 2006 18:52:26 -0700 (PDT)
Message-ID: <20060703015226.30511.qmail@web31812.mail.mud.yahoo.com> (raw)
In-Reply-To: <bf05e51c0607011336o52513602sc93ee49f524d192a@mail.gmail.com>
> This is more of an implementation option, but when I worry about what is
> active/inactive I put start/end dates on the tables. Then you don't need
> active indicators. You just look for the record where now() is >= start
> date and now() <= end date or end date is null. You can even
> activate/deactivate a badge on a future date. Of course, this complicates
> the data integrity - you will need some kind of specialized trigger that
> checks the data and makes sure there are no date overlaps to ensure you
> don't have two badges active at the same time. But is also gives you a
> history of badges and their activities.
Good point. I take it that this type of solution stems from temporal schema design.
Regards,
Richard Broersma Jr.
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: rabroersma@yahoo.com, postgresql@aranya.com, grzm@seespotcode.net
Subject: Re: Alternative to Select in table check constraint
In-Reply-To: <20060703015226.30511.qmail@web31812.mail.mud.yahoo.com>
* 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