Re: changing multiple pk's in one update

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Glenn Maynard <glennfmaynard(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: changing multiple pk's in one update
Date: 2009-04-13 21:18:55
Message-ID: 396486430904131418g3898dc5h2472f9efab331489@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, Apr 13, 2009 at 2:09 PM, Glenn Maynard <glennfmaynard(at)gmail(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Glenn Maynard 2009-04-13 21:32:53 Re: changing multiple pk's in one update
Previous Message Glenn Maynard 2009-04-13 21:09:49 Re: changing multiple pk's in one update