Re: Constraint Problem

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Ron St-Pierre <rstpierre(at)syscor(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>, Greg Stark <gsstark(at)mit(dot)edu>
Subject: Re: Constraint Problem
Date: 2003-11-04 19:59:40
Message-ID: 87oevr52hf.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ron St-Pierre <rstpierre(at)syscor(dot)com> writes:

> Greg Stark wrote:
>
> >Try just
> >
> >create unique index on compass (company) where ysndefault

You might also want

create unique index on compass (company,association)

If a company isn't supposed to have duplicate associations at all. This would
also prevent having a default and non-default relationship to the same
association.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2003-11-04 20:20:44 Re: SELECT question
Previous Message Larry Rosenman 2003-11-04 19:42:21 Re: PostgreSQL v7.4 Release Candidate 1