X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B356D9DCAD6 for ; Wed, 22 Feb 2006 17:25:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83871-05 for ; Wed, 22 Feb 2006 17:25:52 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from nelson.osl.com (216-21-133-120.ip.van.radiant.net [216.21.133.120]) by postgresql.org (Postfix) with ESMTP id 127DE9DCA42 for ; Wed, 22 Feb 2006 17:25:48 -0400 (AST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: Re: Update in all tables Date: Wed, 22 Feb 2006 13:25:48 -0800 Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] Update in all tables Thread-Index: AcY39UcTRWoD4IpNSv2Pj1auPGOKOAAALxYg From: "Owen Jacobson" To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.129 required=5 tests=[AWL=0.129] X-Spam-Score: 0.129 X-Spam-Level: X-Archive-Number: 200602/275 X-Sequence-Number: 24285 Scott Marlowe wrote: > On Wed, 2006-02-22 at 15:13, Andrew Sullivan wrote: > > > No, sorry. While we're at it, though, if you have the same field in > > several tables, it's a good sign that your database is badly > > normalised. You shouldn't have to update more than one table (which > > is why there isn't a way to do this automatically). >=20 > Unless they're all FK/PK pairs, in which case you on update / delete > cascade FKs. It's entirely too bad this has to be designed into the DDL for the = table. It'd be nice if you could specify "CASCADE" on UPDATE or DELETE = queries. I don't see that it's any more of a gun than ON UPDATE/ON = DELETE CASCADE in the foreign key definition. -Owen