Re: CREATION OF PRIMARY KEYS

From: "Andy Hallam" <ahm(at)exel(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATION OF PRIMARY KEYS
Date: 2001-09-27 15:42:09
Message-ID: 9ovhej$1kt$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Very helpful that.

What I meant by 'Can't find anything in the documentation' is I can't find
anything in the documentation (i.e SYNTAX wise) on how you do this at table
creation.

Thanks in advance to anyone with any help on this.

Andy.

"Szabo Zoltan" <col(at)econet(dot)hu> wrote in message
news:3BB337E9(dot)7B304318(at)econet(dot)hu(dot)(dot)(dot)
> 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 David Christian 2001-09-27 15:47:47 Re: showing also value '0' with aggregate count()
Previous Message Tom Ince 2001-09-27 15:41:24 New To PostgreSQL