Unique index on non-erased values

Поиск
Список
Период
Сортировка
От Josep Carles Collazos
Тема Unique index on non-erased values
Дата
Msg-id XFMail.980616000121.maniac@maniac.ddns.org
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Marcio Macedo
Дата:
Сообщение: Binary large objects
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [SQL] Binary large objects