Re: Alternative to Select in table check constraint

From: Erik Jones <erik(at)myemma(dot)com>
To: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
Cc: General Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Alternative to Select in table check constraint
Date: 2006-07-01 12:54:04
Message-ID: 44A6706C.6000503@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Richard Broersma Jr wrote:
> But now that I think about it, using the authors suggestion (if it actually worked), how would
> would it be possible to change the active status from one badge to another?
>
Well, the check constraint as you wrote it requires that there always be
a badge listed as active for each employee. If you changed
the contstraint to: CHECK ( 2 > .....) then you'd be able to unset the
active status and then set a new one to active.

--
erik jones <erik(at)myemma(dot)com>
software development
emma(r)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Daniel CAUNE 2006-07-01 13:47:59 Constraint UNIQUE on a column not case sensitive
Previous Message Jim C. Nasby 2006-07-01 05:50:35 Re: [SQL] Doubt in stored procedure