From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | billy(at)oconnoronline(dot)net |
Cc: | DCorbit(at)connx(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Feature request: Truncate table |
Date: | 2002-06-12 19:44:56 |
Message-ID: | 1023911097.366.23.camel@lerlaptop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 2002-06-12 at 13:37, Billy O'Connor wrote:
> Deletion of data from a PostgreSQL table is very slow.
>
> It would be nice to have a very fast delete like "truncate table."
>
> Now, truncate is a very dangerous command because it is not logged (but
> the same is true for other operations like bulk copy and select into).
> So one needs to be careful how this command is granted. The same damage
> (accidental deletion of all data) can be done by drop table just as
> easily.
>
> I frequently have to do this right now in PostgreSQL, but I simply
> emulate it by drop table/create table.
>
> What is a TRUNCATE TABLE but a drop create anyway? Is there some
> technical difference?
>
It doesn't kill indexes/triggers/constraints/Foreign Key Stuff, etc.
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
From | Date | Subject | |
---|---|---|---|
Next Message | Dann Corbit | 2002-06-12 19:44:57 | Re: Feature request: Truncate table |
Previous Message | Larry Rosenman | 2002-06-12 19:35:41 | Re: Feature request: Truncate table |