Re: TODO item completed - Make a transaction-safe TRUNCATE - Mailing list pgsql-docs

From Bruce Momjian
Subject Re: TODO item completed - Make a transaction-safe TRUNCATE
Date
Msg-id 200302171838.h1HIcDB08939@candle.pha.pa.us
Whole thread Raw
List pgsql-docs
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 <rbt@rbt.ca>
>
> 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

pgsql-docs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Suggested improvements to INSTALL file "Short Version"
Next
From: Bruce Momjian
Date:
Subject: Re: TODO Items completed