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

Re: [NOVICE] Question on TRUNCATE privleges

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Thomas Hallgren <thhal(at)mailblocks(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>,PostgreSQL Novice <pgsql-novice(at)postgresql(dot)org>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: [NOVICE] Question on TRUNCATE privleges
Date: 2005-02-24 22:10:50
Message-ID: 200502242210.j1OMAoM22390@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-novice
Thomas Hallgren wrote:
> > It looks to me like the asymmetry between CREATE TRIGGER and DROP
> > TRIGGER is actually required by SQL99, though, so changing it would
> > be a hard sell (unless SQL2003 fixes it?).
> > 
> > Comments anyone?
> > 
> Why not say that TRUNCATE requires the same privilige as a DELETE and 
> add a trigger type that fires (once) on a TRUNCATE? That would give an 
> owner a chance to prevent it. Such a trigger would probably be useful 
> for other things too.

Uh, that seems like it adds extra complexity just for this single case.

Why don't we allow TRUNCATE by non-owners only if no triggers are
defined, and if they are defined, we throw an error and mention it is
because triggers/contraints exist?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2005-02-24 22:15:42
Subject: Re: [NOVICE] Question on TRUNCATE privleges
Previous:From: George WeaverDate: 2005-02-24 19:44:24
Subject: Re: shutdown postmaster question

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-02-24 22:15:42
Subject: Re: [NOVICE] Question on TRUNCATE privleges
Previous:From: Francisco Figueiredo Jr.Date: 2005-02-24 21:49:35
Subject: Re: [JDBC] Where are we on stored procedures?

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