Re: CREATION OF PRIMARY KEYS

From: Szabo Zoltan <col(at)econet(dot)hu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATION OF PRIMARY KEYS
Date: 2001-09-27 14:30:01
Message-ID: 3BB337E9.7B304318@econet.hu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Manual says:
"(But a primary key cannot be added after table creation.)"

http://www.postgresql.org/idocs/index.php?indices-unique.html

If you do not read manual, or do not search, probably you can't read what is
written there ;)

CoL

Andy Hallam wrote:

> Hi all.
>
> I'm trying to create a PRIMARY KEY on a table I've created but am not having
> any success.
>
> TABLE SCHEMA SQL = :
>
> CREATE TABLE X (XCOL CHAR(10))
>
> When I execute either of the below 2 ALTER TABLE commands:
>
> ALTER TABLE X ADD CONSTRAINT PK_X PRIMARY KEY (XCOL)
> or
> ALTER TABLE X ADD PRIMARY KEY (XCOL)
>
> I keep getting the following error message:
>
> ERROR: ALTER TABLE/ ADD CONSTRAINT is not implemented for that constraint
> type. (State:S1000, Native Code: 7)
>
> Can't find anything in the documentation?
>
> Any ideas ?
>
> thanks.
>
> Andy
> ahm(at)exel(dot)co(dot)uk

--
[ Szabo Zoltan ]
[ software fejleszto ]
[ econet.hu Informatikai Rt. ]
[ 1117 Budapest, Hauszmann A. u. 3. ]
[ tel.: 371 2100 fax: 371 2101 ]

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Janning Vygen 2001-09-27 14:51:45 showing also value '0' with aggregate count()
Previous Message David Santinoli 2001-09-27 13:43:40 PostgreSQL 7.1.3 RPMs for RedHat 6.2