X-Original-To: pgsql-docs@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B655247580B for ; Mon, 17 Feb 2003 13:38:19 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 4E916475461 for ; Mon, 17 Feb 2003 13:38:18 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h1HIcDB08939; Mon, 17 Feb 2003 13:38:13 -0500 (EST) From: Bruce Momjian Message-Id: <200302171838.h1HIcDB08939@candle.pha.pa.us> Subject: Re: TODO item completed - Make a transaction-safe TRUNCATE In-Reply-To: <1045407481.12011.69.camel@jester> To: Rod Taylor Date: Mon, 17 Feb 2003 13:38:12 -0500 (EST) Cc: PostgreSQL-documentation X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/19 X-Sequence-Number: 1653 TODO updated: Make a transaction-safe TRUNCATE (Rod) CVS commit was: date: 2002/11/23 04:05:51; author: momjian; state: Exp; lines: +14 -15 Transaction safe Truncate Rod Taylor --------------------------------------------------------------------------- Rod Taylor wrote: -- Start of PGP signed section. > - Make a transaction-safe TRUNCATE > > rbt=# select version(); > version > ------------------------------------------------------------------------ > PostgreSQL 7.4devel on i386-unknown-freebsd4.7, compiled by GCC 2.95.4 > (1 row) > > rbt=# select * from junk; > col1 > ----------- > some text > (1 row) > > rbt=# begin; > BEGIN > rbt=# truncate junk; > TRUNCATE TABLE > rbt=# select * from junk; > col1 > ------ > (0 rows) > > rbt=# rollback; > ROLLBACK > rbt=# select * from junk; > col1 > ----------- > some text > (1 row) > > > > > -- > Rod Taylor > > PGP Key: http://www.rbt.ca/rbtpub.asc -- End of PGP section, PGP failed! -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073