Cascade on update statement, not on table definition

From: webmaster(at)peladeiro(dot)com(dot)br
To: pgsql-admin(at)postgresql(dot)org
Subject: Cascade on update statement, not on table definition
Date: 2003-02-05 21:23:38
Message-ID: 200302052123.h15LNcK05573@pipobox.peladeiro.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

I saw I can define a table that specifies a ON UPDATE CASCADE for a Foreign Key.

I have a lot of tables with FKs, and a lot of others with others FK\'s for the firts ones, and so on, and I havent defined the ON CASCADE clause on the FKs tables.
Now I need to update a primary key on the \"mother\" table.

Is there a way to execute a stmt like \'update tbl set id_field=NEW_ID where id_field=OLD_ID on CASCADE\', or something like that? Or do I need to redefine my tables, or the constraints?

Tks
Felipe Nascimento

Browse pgsql-admin by date

  From Date Subject
Next Message Preston 2003-02-05 21:33:28 Vacuuming DVs with few/no updates?
Previous Message Matias Monteverde 2003-02-05 20:04:51