Re: How to temporarily disable a table's FK constraints?

From: "Kynn Jones" <kynnjo(at)gmail(dot)com>
To: andy <andy(at)squeakycode(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to temporarily disable a table's FK constraints?
Date: 2007-11-06 13:03:21
Message-ID: c2350ba40711060503y12685325g93691d4e17455778@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/5/07, andy <andy(at)squeakycode(dot)net> wrote:
> Hey, I was just thinking about this... instead of disabling the FK's,
> what about adding a temp table where you could COPY into, then fire off
> a bunch of update's to setup the id fields, etc, etc, then do an Insert
> into realtable select * from temptable?

I like this idea. It's very straightforward. Thanks!

kj

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2007-11-06 13:40:28 Re: How to create primary key
Previous Message Reg Me Please 2007-11-06 12:58:17 Re: generic crosstab