X-Original-To: pgsql-admin@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B770F474E44 for ; Thu, 6 Feb 2003 07:22:50 -0500 (EST) Received: from imo-m08.mx.aol.com (imo-m08.mx.aol.com [64.12.136.163]) by postgresql.org (Postfix) with ESMTP id 1BE5B474E42 for ; Thu, 6 Feb 2003 07:22:50 -0500 (EST) Received: from Felipenasc@aol.com by imo-m08.mx.aol.com (mail_out_v34.21.) id k.1e8.1238f79 (16112) for ; Thu, 6 Feb 2003 07:22:47 -0500 (EST) Received: from aol.com (mow-m29.webmail.aol.com [64.12.137.6]) by air-id12.mx.aol.com (v90_r2.5) with ESMTP id MAILINID124-0206072247; Thu, 06 Feb 2003 07:22:47 -0500 Date: Thu, 06 Feb 2003 07:22:47 -0500 From: Felipenasc@aol.com To: pgsql-admin@postgresql.org Subject: Update cascade on stmt, not on table definition MIME-Version: 1.0 Message-ID: <23235213.3288E138.0B2082A6@aol.com> X-Mailer: Atlas Mailer 2.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/78 X-Sequence-Number: 7276 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=B4s, and a lot of others with others FK's fo= r the firts ones, and so on, and I haven=B4t defined the ON CASCADE clause = on the FK=B4s tables.=20 Now I need to update a primary key on the "mother" table.=20 Is there a way to execute a stmt like 'update tbl set id_field=3DNEW_ID whe= re id_field=3DOLD_ID on CASCADE', or something like that? Or do I need to r= edefine my tables, or the constraints? Tks Felipe Nascimento Felipe Nascimento webmaster@peladeiro.com.br www.peladeiro.com.br