Re: PRIMARY KEY on a *group* of columns imply that each column is NOT

From: Stephane Bortzmeyer <bortzmeyer(at)nic(dot)fr>
To: Guy Rouillier <guyr(at)masergy(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Date: 2005-04-26 20:39:38
Message-ID: 20050426203938.GA18628@nic.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Apr 26, 2005 at 03:22:40PM -0500,
Guy Rouillier <guyr(at)masergy(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-04-26 20:41:28 Re: blob storage
Previous Message Travis Harris 2005-04-26 20:30:18 blob storage