pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Owen Jacobson <ojacobson@osl.com>
To: pgsql-sql@postgresql.org
Subject: Re: Update in all tables
Date: Wed, 22 Feb 2006 13:25:48 -0800
Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.com> (raw)

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



view thread (7+ messages)

Message-ID: <144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.com>
Permalink:  ../144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.com/
Also on:    postgresql.org/message-id/144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ojacobson@osl.com
  Subject: Re: Update in all tables
  In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC233D2F@nelson.osl.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