X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 44609475A7F for ; Wed, 5 Feb 2003 12:23:24 -0500 (EST) Received: from pipobox.peladeiro.com.br (unknown [209.15.115.90]) by postgresql.org (Postfix) with ESMTP id 1EBCF475A5C for ; Wed, 5 Feb 2003 12:23:21 -0500 (EST) Received: (from apache@localhost) by pipobox.peladeiro.com.br (8.11.6/8.11.6) id h15LNcK05573; Wed, 5 Feb 2003 15:23:38 -0600 Date: Wed, 5 Feb 2003 15:23:38 -0600 Message-Id: <200302052123.h15LNcK05573@pipobox.peladeiro.com.br> To: pgsql-admin@postgresql.org Subject: Cascade on update statement, not on table definition From: webmaster@peladeiro.com.br Reply-To: webmaster@peladeiro.com.br X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/61 X-Sequence-Number: 7259 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