Re: Add Foreign Keys To Table

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Add Foreign Keys To Table
Date: 2011-07-07 19:07:46
Message-ID: 201107071207.46656.ahodgson@simkin.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On July 7, 2011 11:55:25 AM Rich Shepard wrote:
> On Thu, 7 Jul 2011, Alan Hodgson wrote:
> > You need a unique index on station_type.sta_type
>
> Alan,
>
> station_type(sta_type) is part of a composite primary key. Doesn't
> primary key automatically imply unique and not null?

It implies the composite is unique. Not sta_type.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2011-07-07 19:30:35 Re: Add Foreign Keys To Table
Previous Message Rich Shepard 2011-07-07 18:55:25 Re: Add Foreign Keys To Table