Howto define a constraint in a existing column - Mailing list pgsql-novice

From Intengu Technologies
Subject Howto define a constraint in a existing column
Date
Msg-id a1afa64b0908090223t77d61541pabd18cb5874f04c8@mail.gmail.com
Whole thread Raw
Responses Re: Howto define a constraint in a existing column  (Thomas Kellerer <spam_eater@gmx.net>)
List pgsql-novice
I am tying to define a primary key constraint to an existing table,
this is what I have tried so far

ALTER TABLE mytable ALTER COLUMN field13 CONSTRAINT name PRIMARY KEY;

I get the following error: ERROR: syntax error at or near "CONSTRAINT"
SQL state: 42601
Character: 61

--
Sindile Bidla

pgsql-novice by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: viewing user defined functions
Next
From: Thomas Kellerer
Date:
Subject: Re: Howto define a constraint in a existing column