Re: Update in all tables

From: "Owen Jacobson" <ojacobson(at)osl(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Update in all tables
Date: 2006-02-22 21:25:48
Message-ID: 144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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).
>
> 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

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2006-02-23 09:03:32 Re: Feature, my misconception or bug??
Previous Message Scott Marlowe 2006-02-22 21:16:26 Re: Update in all tables