Re: altering foreign keys - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: altering foreign keys
Date
Msg-id 107051.32453.qm@web31815.mail.mud.yahoo.com
Whole thread Raw
In response to altering foreign keys  ("Adam Rich" <adam.r@sbcglobal.net>)
List pgsql-general
--- On Tue, 1/22/08, Adam Rich <adam.r@sbcglobal.net> wrote:

> Is there a way to alter the
> existing keys? (it didn't jump out at me in the manual)

    ALTER TABLE your_table
DROP CONSTRAINT your_column_fkey_constraint,
 ADD CONSTRAINT your_column_fkey_constraint
    FOREIGN KEY your_column
     REFERENCES parent_table( primary_column )
      ON UPDATE CASCADE;

Regards,
Richard Broersma Jr.

pgsql-general by date:

Previous
From: Erik Jones
Date:
Subject: Re: altering foreign keys
Next
From: "Adam Rich"
Date:
Subject: Re: altering foreign keys