Re: Truncate width Postgres 7.3 - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: Truncate width Postgres 7.3
Date
Msg-id 20030124012845.GA19950@wolff.to
Whole thread Raw
In response to Truncate width Postgres 7.3  (e.pellegrom@lectric.nl (eric))
List pgsql-general
On Thu, Jan 23, 2003 at 08:32:34 -0800,
  eric <e.pellegrom@lectric.nl> wrote:
> Hi,
>
> A change in this version is:
> "Disallow TRUNCATE on tables that are involved in referential
> constraints (Rod)"
>
> but i've a table witdh a many of referential constraints, what is now
> the best way to empy a table?

The simplest way is:
delete from table-name;

If you have a very large table this might be to slow.

Another option would be to drop the contraints and then truncate the
table.

pgsql-general by date:

Previous
From: "Josh Berkus"
Date:
Subject: Compiling 7.2.3 on RH 8.0
Next
From: "Magnus Naeslund(f)"
Date:
Subject: Re: Inherited tables and NOT NULL (pg 7.2.1)