pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: webmaster@peladeiro.com.br
To: pgsql-admin@postgresql.org
Subject: Cascade on update statement, not on table definition
Date: Wed, 5 Feb 2003 15:23:38 -0600
Message-ID: <200302052123.h15LNcK05573@pipobox.peladeiro.com.br> (raw)

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



Message-ID: <200302052123.h15LNcK05573@pipobox.peladeiro.com.br>
Permalink:  ../200302052123.h15LNcK05573@pipobox.peladeiro.com.br/
Also on:    postgresql.org/message-id/200302052123.h15LNcK05573@pipobox.peladeiro.com.br

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: webmaster@peladeiro.com.br
  Subject: Re: Cascade on update statement, not on table definition
  In-Reply-To: <200302052123.h15LNcK05573@pipobox.peladeiro.com.br>
  References: <200302052123.h15LNcK05573@pipobox.peladeiro.com.br>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox