Re: Truncate width Postgres 7.3

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: eric <e(dot)pellegrom(at)lectric(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Truncate width Postgres 7.3
Date: 2003-01-24 01:28:45
Message-ID: 20030124012845.GA19950@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jan 23, 2003 at 08:32:34 -0800,
eric <e(dot)pellegrom(at)lectric(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Naeslund(f) 2003-01-24 02:13:32 Re: Inherited tables and NOT NULL (pg 7.2.1)
Previous Message Josh Berkus 2003-01-24 01:26:56 Compiling 7.2.3 on RH 8.0