Re: Constraint Problem - Mailing list pgsql-general

From Greg Stark
Subject Re: Constraint Problem
Date
Msg-id 87oevr52hf.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Constraint Problem  (Ron St-Pierre <rstpierre@syscor.com>)
List pgsql-general
Ron St-Pierre <rstpierre@syscor.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

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Constraint Problem
Next
From: Greg Hulands
Date:
Subject: Foreign Key to Inherited table