| From: | Joel Burton <jburton(at)scw(dot)org> |
|---|---|
| To: | Riaan van Jaarsveld <rvanjaarsveld(at)radioretail(dot)co(dot)za> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Add primary and unique keys |
| Date: | 2001-06-18 22:19:52 |
| Message-ID: | Pine.LNX.4.21.0106181818490.32664-100000@olympus.scw.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)scw(dot)org>
Director of Information Systems, Support Center of Washington
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alex Pilosov | 2001-06-18 22:30:48 | Re: aggregate function for median calculation |
| Previous Message | Tom Lane | 2001-06-18 21:19:23 | Re: General Security-Question |