Modifying FK constraints

From: "Oleg Lebedev" <oleglebedev(at)waterford(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Modifying FK constraints
Date: 2004-11-10 17:00:02
Message-ID: BA823062DCC29644992A83C3C5AF9FCBE330@wistomail01.waterford.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greetings.

Is it possible to modify a foreign key constraint and force it to
cascade on update? If there is no such SQL command, then is it possible
to update some system tables to accomplish this?

The problem is that I have a bunch of tables with FK constraints and I
need to update primary key values in a lot of these tables. FK
constraints were declared, but without cascading updates. Now, I am
trying to modify all of them to cascade updates so that I can change
primary keys and have these changes propaged to the referencing values.

What would be the easiest solution for this?

Thanks.

Oleg

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-11-10 17:22:52 Re: Modifying FK constraints
Previous Message Rolf stvik 2004-11-10 16:44:45 Re: Important Info on comp.databases.postgresql.general