Update cascade on stmt, not on table definition

From: Felipenasc(at)aol(dot)com
To: pgsql-admin(at)postgresql(dot)org
Subject: Update cascade on stmt, not on table definition
Date: 2003-02-06 12:22:47
Message-ID: 23235213.3288E138.0B2082A6@aol.com
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 FK´s, and a lot of others with others FK's for the firts ones, and so on, and I haven´t defined the ON CASCADE clause on the FK´s 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

Felipe Nascimento
webmaster(at)peladeiro(dot)com(dot)br
www.peladeiro.com.br

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2003-02-06 12:31:47 Re: Problems upgrading from 7.1.3
Previous Message Gareth Kirwan 2003-02-06 11:51:24 Re: Reserved words