Skip site navigation (1) Skip section navigation (2)

Re: Must be table owner to truncate?

From: Kevin Hunter <hunteke(at)earlham(dot)edu>
To: Postgres General List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Must be table owner to truncate?
Date: 2008-07-30 11:36:35
Message-ID: 48905243.7030503@earlham.edu (view raw or flat)
Thread:
Lists: pgsql-general
At 3:45p -0400 on Mon, 28 Jul 2008, Said Ramirez wrote:
> According to the documentation,
> http://www.postgresql.org/docs/current/interactive/sql-truncate.html ,
> only the owner can truncate a table. Which means the non-owner must
> either log in/ switch roles as the owner, or they can just run a DELETE.

Well that's interesting.  From a security standpoint, what's the
difference between an unqualified DELETE and a TRUNCATE?

Also interesting to note that TRUNCATE is transaction safe, but not MVCC
safe.  Good to know, good to know ...

Kevin

In response to

Responses

pgsql-general by date

Next:From: RagnarDate: 2008-07-30 12:52:26
Subject: Re: Must be table owner to truncate?
Previous:From: Craig RingerDate: 2008-07-30 08:10:06
Subject: Re: How do I set up automatic backups?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group