Unique index on non-erased values - Mailing list pgsql-sql

From Josep Carles Collazos
Subject Unique index on non-erased values
Date
Msg-id XFMail.980616000121.maniac@maniac.ddns.org
Whole thread Raw
List pgsql-sql
I have a table with users in this manner:

create table users (
                        id char(8) not null,
                        active boolean,
                        erased boolean
                        )
I wat to ensure that the id is a unique index but only among the non-erased
users (Those who erased is false).
Someone can help me ?

An other question. PostgreSQL supports constraints ?
Can I simulate constraints of some manner ?

thx



pgsql-sql by date:

Previous
From: Marcio Macedo
Date:
Subject: Binary large objects
Next
From: "Jackson, DeJuan"
Date:
Subject: RE: [SQL] Binary large objects