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