pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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



view thread (2+ messages)  latest in thread

Message-ID: <23235213.3288E138.0B2082A6@aol.com>
Permalink:  ../23235213.3288E138.0B2082A6@aol.com/
Also on:    postgresql.org/message-id/23235213.3288E138.0B2082A6@aol.com

 · 

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: 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