Re: unique in two not so unique columns

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: unique in two not so unique columns
Date: 2002-11-02 09:33:09
Message-ID: 75463260.1036233189@liza
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Thomas,

--On Samstag, 2. November 2002 00:58 -0600 "Thomas T. Thai"
<tom(at)minnesota(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2002-11-02 09:37:27 Re: unique in two not so unique columns
Previous Message Doriano Azzena 2002-11-02 09:21:11 Re: PGDATESTYLE + SuSe 8.0