Re: Alternative to Select in table check constraint - Mailing list pgsql-sql

From Erik Jones
Subject Re: Alternative to Select in table check constraint
Date
Msg-id 44A6706C.6000503@myemma.com
Whole thread Raw
In response to Re: Alternative to Select in table check constraint  (Richard Broersma Jr <rabroersma@yahoo.com>)
List 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@myemma.com>
software development
emma(r)



pgsql-sql by date:

Previous
From: Richard Broersma Jr
Date:
Subject: Re: Alternative to Select in table check constraint
Next
From: Daniel CAUNE
Date:
Subject: Constraint UNIQUE on a column not case sensitive