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-10-01 13:08:53
Message-ID: 9p9pv9$29ff$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thankyou, I have now resolved this issue.

"Andy Hallam" <ahm(at)exel(dot)co(dot)uk> wrote in message
news:9ovhej$1kt$1(at)news(dot)tht(dot)net(dot)(dot)(dot)
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Nalin Dahyabhai 2001-10-01 14:13:04 Re: Encoding passwords
Previous Message Andy Hallam 2001-10-01 13:07:23 Datatype for large UNICODE string storage