Re: Backupping the table values - Mailing list pgsql-general

From George Essig
Subject Re: Backupping the table values
Date
Msg-id 6744b38505030109177f8a15d7@mail.gmail.com
Whole thread Raw
In response to Re: Backupping the table values  (Vitaly Belman <vitalyb@gmail.com>)
List pgsql-general
On Tue, 1 Mar 2005 17:48:44 +0200, Vitaly Belman <vitalyb@gmail.com> wrote:
> --------------------------------------------------------------------------------
> CREATE TABLE functions.temp1
> (
>   id1 int4 NOT NULL,
>   id2 int4,
>   CONSTRAINT pk_temp1 PRIMARY KEY (id1),
>   CONSTRAINT temp2_id2 FOREIGN KEY (id2) REFERENCES functions.temp2
> (id2) ON UPDATE RESTRICT ON DELETE RESTRICT DEFERRABLE INITIALLY
> DEFERRED
> )
> WITHOUT OIDS;
>
>

Remove 'ON UPDATE RESTRICT ON DELETE RESTRICT' from your create table
statement.

The manual says the following about RESTRICT:

"Produce an error indicating that the deletion or update would create
a foreign key constraint violation. This is the same as NO ACTION
except that the check is not deferrable."

George Essig

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: row numbering
Next
From: Tom Lane
Date:
Subject: Re: Index size