Adding ON UPDATE CASCADE to an existing foreign key constraint

From: Rich Doughty <rich(at)opusvl(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Adding ON UPDATE CASCADE to an existing foreign key constraint
Date: 2006-05-04 15:18:01
Message-ID: 445A1B29.8010803@opusvl.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

I have a foreign key constraint that I'd like to alter. I'd rather not
drop and re-create it due to the size of the table involved. All I need
to do is add an ON UPDATE CASCADE.

Is it ok to set confupdtype to 'c' in pg_constraint (and will this be
all that's needed) or is it safer to drop and recreate the constraint?

PG Version 8.0.3

Thanks a lot

- Rich Doughty

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Guy Rouillier 2006-05-04 15:29:56 Re: Segfaults with 8.1.3 on amd64
Previous Message Christo Romberg 2006-05-04 14:56:02 Re: FATAL: database "dspace" does not exist"

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2006-05-04 15:39:50 Re: autovacuum logging, part deux.
Previous Message Chris Browne 2006-05-04 14:46:54 Re: autovacuum logging, part deux.