Re: PRIMARY KEY and UNIQUE - Mailing list pgsql-general

From Andrew Gould
Subject Re: PRIMARY KEY and UNIQUE
Date
Msg-id 20020214153042.54752.qmail@web13405.mail.yahoo.com
Whole thread Raw
In response to PRIMARY KEY and UNIQUE  (Erwin Ambrosch <ambre@ebutec.com>)
Responses Re: PRIMARY KEY and UNIQUE  ("Liam DeMasi" <ldemasi@acsinc-nj.com>)
List pgsql-general
--- Erwin Ambrosch <ambre@ebutec.com> wrote:
> Hi,
>
> I have a such a table.
>
> CREATE TABLE int_article (
>   name          VARCHAR(12) UNIQUE
>   headline      TEXT,
>   summary      TEXT,
>   main            TEXT,
>   footer           TEXT,
>   PRIMARY KEY (name)
> );
>
> Is the UNIQUE constraint neccessary, because if have
> specified the column
> name to be the primary key.
>
> Thanks in advance
> Erwin

No; but if you eliminate 'UNIQUE', you'll need to
replace it with 'NOT NULL'.

Andrew Gould


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: PRIMARY KEY and UNIQUE
Next
From: "Liam DeMasi"
Date:
Subject: Re: PRIMARY KEY and UNIQUE