Re: FW: truncate error

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

 



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)

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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux