Re: PRIMARY KEY on a *group* of columns imply that each column is NOT - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Date
Msg-id 20050426203938.GA18628@nic.fr
Whole thread Raw
In response to Re: PRIMARY KEY on a *group* of columns imply that each column is NOT NULL?  ("Guy Rouillier" <guyr@masergy.com>)
Responses Re: PRIMARY KEY on a *group* of columns imply that each
List pgsql-general
On Tue, Apr 26, 2005 at 03:22:40PM -0500,
 Guy Rouillier <guyr@masergy.com> wrote
 a message of 37 lines which said:

> "The primary key constraint specifies that a column or columns of a
> table may contain only unique (non-duplicate), nonnull values.
> Technically, PRIMARY KEY is merely a combination of UNIQUE and NOT
> NULL"
>
> Primary key columns cannot contain null values.

I read the above also. It is perfectly clear for primary key on one
column.

But it does not apply to primary keys containing a group of
columns. In that case (my case), columns do not have to be UNIQUE. But
they have to be NOT NULL, which puzzles me.

pgsql-general by date:

Previous
From: Travis Harris
Date:
Subject: blob storage
Next
From: Scott Marlowe
Date:
Subject: Re: blob storage