ALTER TABLE -- how to add ON DELETE CASCADE?

Поиск
Список
Период
Сортировка
От felix@crowfix.com
Тема ALTER TABLE -- how to add ON DELETE CASCADE?
Дата
Msg-id 20060307220611.GA5140@crowfix.com
обсуждение исходный текст
Ответы Re: ALTER TABLE -- how to add ON DELETE CASCADE?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have table A with a column AA which references table B's primary
key BB, and I want to alter column AA to delete on cascade.

    ALTER TABLE A COLUMN AA ADD CONSTRAINT DELETE ON CASCADE

is what I tried with a zillion variations, all reporting syntax
errors.

\h alter table seems to be missing any way to add a constraint to a
column.

Or maybe this isn't a constraint ... does seem like maybe the wrong
name, but I can't think what else it would be called, and the other
choices shown with \h seem even less likely.

Your assiatnce is much appreciated.  I would gladly send you some
Oreos or Ginger Nuts :-)

--
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

В списке pgsql-general по дате отправления:

Предыдущее
От: Ken Johanson
Дата:
Сообщение: Perspective: PostgreSQL usage boon after release of 8.2
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ALTER TABLE -- how to add ON DELETE CASCADE?