Re: REFRENTIAL INTEGRITY CHECKING

From: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
To: Sudheer Palaparambil <p_sudheers(at)rediffmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: REFRENTIAL INTEGRITY CHECKING
Date: 2001-07-16 20:22:18
Message-ID: Pine.LNX.4.21.0107161621420.9097-100000@aluminum.cs.pitt.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, 16 Jul 2001, Thalis A. Kalfigopoulos wrote:

> On 16 Jul 2001, Sudheer Palaparambil wrote:
>
> > Hi,
> >
> > How do we avoid referential integrity (FOREIGN KEY) checking till commit. My pgsql server
> > is checking it as soon as I am issueing an INSERT command. Pls help.
> >
> > Thanks in advance.
>
> SET CONSTRAINTS TO DEFERRED

Sorry, it's actually:
SET CONSTRAINTS <constraint_name> TO DEFERRED

IF you don't want to give a specific constraint name, just give ALL.

cheers,
thalis

>
> This will do the job only if your fk was not defined as INITIALLY IMMEDIATE NOT DEFERRABLE
>
> cheers,
> thalis
>
> >
> > Sudheer
> >
> > ____________________________________________________
> > http://www.monsterindia.com - The Best Jobs. For the Best Minds.
> >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 2: you can get off all lists at once with the unregister command
> > (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-07-16 20:38:01 Re: Error Installing
Previous Message Tom Lane 2001-07-16 20:10:06 Re: AW: psql and lo_import