Re: Adding a primary key

From: GH <grasshacker(at)over-yonder(dot)net>
To: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
Cc: "P(dot) Dwayne Miller" <dmiller(at)espgroup(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Adding a primary key
Date: 2001-06-12 23:33:30
Message-ID: 20010612183330.A12517@over-yonder.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jun 12, 2001 at 04:57:35PM -0400, some SMTP stream spewed forth:
> You can only define the pri key on table creation. If you miss it there, you can only add a Unique index (which is pretty much the same I think)
>

A column defined as a primary key is both not null and unique. A only
unique index may be null.

gh

> Check http://www.postgresql.org/idocs/index.php?sql-altertable.html
>
>
> cheers,
> thalis
>
> On Tue, 12 Jun 2001, P. Dwayne Miller wrote:
>
> > How do I add a primary key to a table. The database was migrated using
> > pgAdmin and no indexes or keys were migrated. I'd like to add a primary
> > key constraint to a table.
> >

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2001-06-13 00:03:43 Re: Big5 contains '\'
Previous Message Tom Lane 2001-06-12 23:28:14 Re: Merge join exhausting swap space