Unique index on non-erased values

From: Josep Carles Collazos <maniac(at)maniac(dot)ddns(dot)org>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Unique index on non-erased values
Date: 1998-06-15 22:01:21
Message-ID: XFMail.980616000121.maniac@maniac.ddns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-sql by date

  From Date Subject
Next Message Jackson, DeJuan 1998-06-15 22:20:57 RE: [SQL] Binary large objects
Previous Message Marcio Macedo 1998-06-15 17:51:27 Binary large objects