Re: Backupping the table values

From: George Essig <george(dot)essig(at)gmail(dot)com>
To: Vitaly Belman <vitalyb(at)gmail(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Backupping the table values
Date: 2005-03-01 17:17:39
Message-ID: 6744b38505030109177f8a15d7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 1 Mar 2005 17:48:44 +0200, Vitaly Belman <vitalyb(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-03-01 18:22:08 Re: Index size
Previous Message Greg Stark 2005-03-01 16:59:18 Re: multicolumn GIST index question