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

Re: Must be owner to truncate?

From: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>,Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Must be owner to truncate?
Date: 2005-07-07 20:44:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Thu, Jul 07, 2005 at 01:48:59PM -0400, Tom Lane wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> >   The current permissions checks for truncate seem to be excessive.  It
> >   requires that you're the owner of the relation instead of requiring
> >   that you have delete permissions on the relation.  It was pointed out
> >   that truncate doesn't call triggers but it seems like that would be
> >   something easy enough to check for.
> There are other reasons for restricting it:
>  * truncate takes a much stronger lock than a plain delete does.
>  * truncate is not MVCC-safe.
> I don't really agree with the viewpoint that truncate is just a quick
> DELETE, and so I do not agree that DELETE permissions should be enough
> to let you do a TRUNCATE.

What about adding a truncate permission? I would find it useful, as it
seems would others.
Jim C. Nasby, Database Consultant               decibel(at)decibel(dot)org 
Give your computer some brain candy! Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

In response to


pgsql-hackers by date

Next:From: Ayush ParasharDate: 2005-07-07 20:55:55
Subject: Multi-byte and client side character encoding tests for copy command..
Previous:From: Ayush ParasharDate: 2005-07-07 20:32:32
Subject: <no subject>

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