Re: unique in two not so unique columns

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: unique in two not so unique columns
Дата
Msg-id 75463260.1036233189@liza
обсуждение исходный текст
Ответ на unique in two not so unique columns  ("Thomas T. Thai" <tom@minnesota.com>)
Ответы Re: unique in two not so unique columns  ("Thomas T. Thai" <tom@minnesota.com>)
Список pgsql-general
Hi Thomas,

--On Samstag, 2. November 2002 00:58 -0600 "Thomas T. Thai"
<tom@minnesota.com> wrote:

> I have two columns in a table:
>
> email     varchar(64)
> verified  boolean
>
> How do I make a check for unique email that is verified while allowing for
> non-verified emails to be not unique?

Before thinking of a solution for this in PG, I dont
see why you need this requirement in the first place:
whay should the very same e-mail be both verified and
unveryfied? And even more - why should be more then one
row telling you this very same e-mail is unverified?

Is this only an example which does not serve very well
or is there a bigger picture?

Regards
Tino

В списке pgsql-general по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: unique in two not so unique columns
Следующее
От: "Thomas T. Thai"
Дата:
Сообщение: Re: unique in two not so unique columns