X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 02C68D9FE3 for ; Tue, 4 Oct 2005 15:34:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 07301-02 for ; Tue, 4 Oct 2005 18:34:21 +0000 (GMT) Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by svr1.postgresql.org (Postfix) with ESMTP id DAE61D929B for ; Tue, 4 Oct 2005 15:34:20 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 04 Oct 2005 14:35:03 -0400 Received: from alvh.no-ip.org (200.85.217.253) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 433A601F001B879F; Tue, 4 Oct 2005 14:34:21 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id B2A81C3A1DD; Tue, 4 Oct 2005 14:34:22 -0400 (CLT) Date: Tue, 4 Oct 2005 14:34:22 -0400 From: Alvaro Herrera To: Sidar =?iso-8859-1?Q?L=F3pez?= Cruz Cc: pgsql-admin@postgresql.org Subject: Re: FW: truncate error Message-ID: <20051004183422.GI7732@surnet.cl> Mail-Followup-To: Sidar =?iso-8859-1?Q?L=F3pez?= Cruz , pgsql-admin@postgresql.org References: <20051004152142.GC6925@surnet.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.10i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.964 required=5 tests=[AWL=-0.812, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, RCVD_IN_NJABL_PROXY=1.026] X-Spam-Level: * X-Archive-Number: 200510/65 X-Sequence-Number: 19137 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)