Re: FOREIGN KEY migration of syntax, help needed

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mike Haberman <mikeh(at)ncsa(dot)uiuc(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: FOREIGN KEY migration of syntax, help needed
Date: 2007-07-31 20:00:59
Message-ID: 5943.1185912059@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mike Haberman <mikeh(at)ncsa(dot)uiuc(dot)edu> writes:
> Will the following take care of all three statements?

> ALTER TABLE ONLY assettype
> ADD CONSTRAINT at_fk_1 FOREIGN KEY (pid) REFERENCES assettype(id)
> ON UPDATE CASCADE ON DELETE CASCADE;

Yes, there are three or so triggers under the hood of any FOREIGN KEY
constraint.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2007-07-31 20:11:46 continue in plpgsql 7.4
Previous Message RW 2007-07-31 19:49:37 Re: Need quick help with standalone mode