ALTER TABLE -- how to add ON DELETE CASCADE? - Mailing list pgsql-general

From felix@crowfix.com
Subject ALTER TABLE -- how to add ON DELETE CASCADE?
Date
Msg-id 20060307220611.GA5140@crowfix.com
Whole thread Raw
Responses Re: ALTER TABLE -- how to add ON DELETE CASCADE?  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Ken Johanson
Date:
Subject: Perspective: PostgreSQL usage boon after release of 8.2
Next
From: Tom Lane
Date:
Subject: Re: ALTER TABLE -- how to add ON DELETE CASCADE?