title: How do I disable referential integrity in Postgres 8.2?
body: <p>Google results on this one are a bit thin, but suggest that it is not easily possible.</p>
  
  <p>My specific problem is that I need to renumber the IDs in two tables that are related to each other such that table B has an "table_a_id" column in it. I can't renumber table A first because then its children in B point to the old IDs. I can't renumber table B first because then they would point to the new IDs before they were created. Now repeat for three or four tables.</p>
  
  <p>I don't really want to have to fiddle around with individual relationships when I could just "start transaction; disable ref integrity; sort IDs out; re-enable ref integrity; commit transaction". Mysql and MSSQL both provide this functionality IIRC so I would be surprised if Postgres didn't.</p>
  
  <p>Thanks!</p>