From: Felipenasc@aol.com
To: pgsql-admin@postgresql.org
Subject: Update cascade on stmt, not on table definition
Date: Thu, 06 Feb 2003 07:22:47 -0500
Message-ID: <23235213.3288E138.0B2082A6@aol.com> (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
Felipe Nascimento
webmaster@peladeiro.com.br
www.peladeiro.com.br
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: Felipenasc@aol.com
Subject: Re: Update cascade on stmt, not on table definition
In-Reply-To: <23235213.3288E138.0B2082A6@aol.com>
References: <23235213.3288E138.0B2082A6@aol.com>
* 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