Search Postgresql Archives

Re: Backupping the table values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 1 Mar 2005 17:48:44 +0200, Vitaly Belman <vitalyb@xxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux