ALTER TABLE to add Foreign Key Constraint

Поиск
Список
Период
Сортировка
Искать
От
Vipin Samtani
Тема
ALTER TABLE to add Foreign Key Constraint
Дата
Msg-id
394BD376.4D79D700@attglobal.net
Список
Дерево обсуждения
ALTER TABLE to add Foreign Key Constraint Vipin Samtani <vipin@attglobal.net>
Re: ALTER TABLE to add Foreign Key Constraint "Robert B. Easter" <reaster@comptechnews.com>
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 по дате отправления
От: Andrew Snow
Дата:
Сообщение: RE: Lock rekord
От: brianb-pggeneral@edsamail.com
Дата:
FAQ