Re: FW: truncate error - Mailing list pgsql-admin

From Alvaro Herrera
Subject Re: FW: truncate error
Date
Msg-id 20051004183422.GI7732@surnet.cl
Whole thread Raw
In response to FW: truncate error  (Sidar López Cruz <sidarlopez@hotmail.com>)
List pgsql-admin
On Tue, Oct 04, 2005 at 10:01:42AM -0600, Sidar López Cruz wrote:
> Yo primero hice truncate a la tabla derivada y luego a la tabla maestra y
> PostgreSQL no me lo permitia, entonces hice DELETE sobre la tabla maestro y
> si pudo borrar los registros, aun no se porque pasa eso.

Hola, el idioma de esta lista es el inglés y por lo tanto nos debemos
restringir a usar ese idioma.  Para discusiones en castellano te sugiero
la lista pgsql-es-ayuda.

Con respecto a TRUNCATE, en 8.1 se puede hacer simultáneamente a ambas
tablas:

TRUNCATE tabla_derivada, tabla_maestra;

y debería funcionar (si no funciona, es un bug, por favor reportalo).
En versiones anteriores no está permitido usar TRUNCATE en tablas que
tienen llaves foráneas, ni se permite hacer TRUNCATE en más de una
tabla simultáneamente.

--
Alvaro Herrera                 http://www.amazon.com/gp/registry/CTMLCN8V17R4
Essentially, you're proposing Kevlar shoes as a solution for the problem
that you want to walk around carrying a loaded gun aimed at your foot.
(Tom Lane)

pgsql-admin by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Altering WAL Segment File Size
Next
From: "Jeff Kirby"
Date:
Subject: Re: Vacuum Full Analyze Stalled