pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma <richard.broersma@gmail.com>
To: Glenn Maynard <glennfmaynard@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: changing multiple pk's in one update
Date: Mon, 13 Apr 2009 14:18:55 -0700
Message-ID: <396486430904131418g3898dc5h2472f9efab331489@mail.gmail.com> (raw)
In-Reply-To: <d18085b50904131409g10d43d6cs35dd14ede13bc02@mail.gmail.com>
References: <49DC1034.1060705@frii.com>
	<dcc563d10904101120y49f00977nc74132e982518444@mail.gmail.com>
	<49E37441.6030301@frii.com>
	<d18085b50904131409g10d43d6cs35dd14ede13bc02@mail.gmail.com>

On Mon, Apr 13, 2009 at 2:09 PM, Glenn Maynard <glennfmaynard@gmail.com> wrote:

> Your PK is a composite of (entry, order)?  Won't your foreign keys
> elsewhere all break when you shift the order around?

If there really are foreign keys, then an update will not be allowed
to shift a primary key unless the foreign key is set with ON UPDATE
CASCADE then the shifts will be cascaded to all references
automatically.

-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug



view thread (15+ messages)  latest in thread

Message-ID: <396486430904131418g3898dc5h2472f9efab331489@mail.gmail.com>
Permalink:  ../396486430904131418g3898dc5h2472f9efab331489@mail.gmail.com/
Also on:    postgresql.org/message-id/396486430904131418g3898dc5h2472f9efab331489@mail.gmail.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: richard.broersma@gmail.com, glennfmaynard@gmail.com
  Subject: Re: changing multiple pk's in one update
  In-Reply-To: <396486430904131418g3898dc5h2472f9efab331489@mail.gmail.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