Re: How to create primary key

From: Richard Huxton <dev(at)archonet(dot)com>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: Reg Me Please <regmeplease(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to create primary key
Date: 2007-11-06 13:43:47
Message-ID: 47306F93.3060607@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Albe Laurenz wrote:
> Richard Huxton wrote:
>>> What'd be the syntax to create a primary key on an already
>>> build table?
>> ALTER TABLE my_table ADD PRIMARY CONSTRAINT (existing_column);
>
> I'm sure it's just a typo, but that is wrong.
> It is not ADD PRIMARY CONSTRAINT, but ADD PRIMARY KEY.

It is indeed a typo. Thanks Albe.

Particularly irritating as I'd bothered give a link to the right manual
page too...

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message SHARMILA JOTHIRAJAH 2007-11-06 13:47:08 Postgresql simple query performance question
Previous Message Albe Laurenz 2007-11-06 13:40:28 Re: How to create primary key