Re: Add primary and unique keys - Mailing list pgsql-general

From Joel Burton
Subject Re: Add primary and unique keys
Date
Msg-id Pine.LNX.4.21.0106181818490.32664-100000@olympus.scw.org
Whole thread Raw
List pgsql-general
On Mon, 18 Jun 2001, Riaan van Jaarsveld wrote:

> I have read your article at
> http://techdocs.postgresql.org/techdocs/updatingcolumns.php and I also read
> that PostgreSQL does not support the "add column PRIMARY KEY UNIQUE"
> statement.
>
> I then used this function to create the unique key in a column "CREATE
> UNIQUE INDEX pers_pkey ON pers ( id );"
> but how does one then create the primary key for an existing field?

AFAIK, a primary key in PG is just a unique index that
is named tablename_pkey.

--
Joel Burton   <jburton@scw.org>
Director of Information Systems, Support Center of Washington


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: General Security-Question
Next
From: John Holland
Date:
Subject: Re: General Security-Question