Re: Foreign Key Option

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Erwin Ambrosch <ambre(at)ebutec(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Foreign Key Option
Date: 2002-05-06 17:03:46
Message-ID: 20020506095908.R43441-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 6 May 2002, Erwin Ambrosch wrote:

> can I change the foreign key optins (e.g. ON UPDATE, ON DELETE) after the
> table has been created. And if yea, does the change also affect already
> inserted rows.

You could drop the triggers and then recreate the constraint
with alter table. That won't affect past changes (for example rows that
were deleted by a on delete cascade wouldn't suddenly become visible with
nulls if it were changed to on delete set null).

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nigel J. Andrews 2002-05-06 17:17:33 Re: IF- statements in a rule's 'DO INSTEAD SELECT ...'-
Previous Message Johnson, Shaunn 2002-05-06 16:48:34 pg_restore question