From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Nicolás Domínguez Florit <ndomin(at)rec(dot)unicen(dot)edu(dot)ar> |
Cc: | PostgreSQL list ES <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: Re: [pgsql-es-ayuda] Deferrable ¿funciona? |
Date: | 2006-02-08 12:22:39 |
Message-ID: | 20060208122239.GD5219@surnet.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Nicolás Domínguez Florit escribió:
> CREATE TABLE "public"."telefono" (
> "legajo" INTEGER NOT NULL,
> "datos" VARCHAR,
> CONSTRAINT "fk_telefono_persona_legajo" FOREIGN KEY ("legajo")
> REFERENCES "public"."persona"("legajo")
> ON DELETE RESTRICT
> ON UPDATE CASCADE
> DEFERRABLE
> INITIALLY DEFERRED
> se entiende ahora? porque con el insert anda todo bien y con el delete se
> produce el error antes de hacer el commit?
Por el ON DELETE RESTRICT. La documentacion dice:
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.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Hernán Jaramillo | 2006-02-08 13:12:14 | Re: Consulta-HELP |
Previous Message | Nicolás Domínguez Florit | 2006-02-08 12:08:23 | Re: [pgsql-es-ayuda] Deferrable ¿funciona? |