Update of foreign key values - Mailing list pgsql-general

From Roderick A. Anderson
Subject Update of foreign key values
Date
Msg-id Pine.LNX.4.33.0308111100460.8612-100000@main.cyber-office.net
Whole thread Raw
Responses Re: Update of foreign key values
Re: Update of foreign key values
List pgsql-general
I have two tables in two databases (Pg 7.2.1 - yes I need to upgrade but
there are several other dependencies I have to resolve first) and I need
to update one database's tables so they can be merged into the other
database's table.  I know I can drop the constraints and update the tables
(primary key, and foreign key) but was hoping I'd not have to do that.
   An attempt at using the techniques in Joel Burton's "Referential
Integrity Tutorial & Hacking the Referential Integrity tables" was
unsuccessful.

Is there a method I can use to add 1000 to all the primary and foreign
keys in one pass?  Searches using Google and the PostgreSQL docs turned up
nothing useful to my situation.  I see if the table/constraint would have
been created differently the updates would have cascaded but that did
not happen.


TIA,
Rod
--
  "Open Source Software - Sometimes you get more than you paid for..."





pgsql-general by date:

Previous
From: Mike Benoit
Date:
Subject: Re: Tsearch limitations
Next
From: Jonathan Gardner
Date:
Subject: Re: One table into two different databases