ALTER TABLE to add Foreign Key Constraint - Mailing list pgsql-general

From Vipin Samtani
Subject ALTER TABLE to add Foreign Key Constraint
Date
Msg-id 394BD376.4D79D700@attglobal.net
Whole thread Raw
Responses Re: ALTER TABLE to add Foreign Key Constraint  ("Robert B. Easter" <reaster@comptechnews.com>)
List pgsql-general
I am trying to designate foreign keys after tables "distributors" and
"addresses" have already been created with primary keys "distributor"
and "address" respectively. I am attempting to use ALTER TABLE to
accomplish this. I found this statement in the documentation

ALTER TABLE distributors ADD CONSTRAINT distfk FOREIGN KEY (address)
REFERENCES addresses(address) MATCH FULL


When I run it, I get this error:

ERROR:  parser: parse error at or near "constraint"

What is wrong with the statement?

Vipin

pgsql-general by date:

Previous
From: "Andrew Snow"
Date:
Subject: RE: Lock rekord
Next
From: brianb-pggeneral@edsamail.com
Date:
Subject: Backend died while dropping index