Re: adding on delete cascade constraint?
От | Jean-Christian Imbeault |
---|---|
Тема | Re: adding on delete cascade constraint? |
Дата | |
Msg-id | 3F6AFE62.1030709@mega-bucks.co.jp обсуждение исходный текст |
Ответ на | Re: adding on delete cascade constraint? (Oliver Elphick <olly@lfix.co.uk>) |
Ответы |
Re: adding on delete cascade constraint?
Re: adding on delete cascade constraint? |
Список | pgsql-general |
Oliver Elphick wrote: >>Foreign Key constraints: $1 FOREIGN KEY (pid) REFERENCES products(id) ON >>UPDATE NO ACTION ON DELETE NO ACTION > > Drop the constraint; then add an amended one. Ok, how do I drop the constraint, it has no name. The documentation is rather poor on how to get the name of unamed constraints: "To remove a constraint you need to know its name. If you gave it a name then that's easy. Otherwise the system assigned a generated name, which you need to find out. The psql command \d tablename can be helpful here" Secondly what is the correct syntax for adding a new constraint with ON DELETE CASCADE? Thanks, Jean-Christian Imbeault
В списке pgsql-general по дате отправления: