Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-28 Thread Keith Worthington
On Thu, 24 Feb 2005 17:15:42 -0500, Tom Lane wrote > Bruce Momjian writes: > > Uh, that seems like it adds extra complexity just for this single case. > > Yeah. I've dropped the idea personally -- the suggestion that the table > owner can provide a SECURITY DEFINER procedure to do the TRUNCATE i

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-24 Thread Tom Lane
"Keith Worthington" <[EMAIL PROTECTED]> writes: > On Thu, 24 Feb 2005 17:15:42 -0500, Tom Lane wrote >> Yeah. I've dropped the idea personally -- the suggestion that the table >> owner can provide a SECURITY DEFINER procedure to do the TRUNCATE if >> he wants to allow others to do it seems to me

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-24 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Uh, that seems like it adds extra complexity just for this single case. > > Yeah. I've dropped the idea personally -- the suggestion that the table > owner can provide a SECURITY DEFINER procedure to do the TRUNCATE if he > wants to allow others to do

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-24 Thread Tom Lane
Bruce Momjian writes: > Uh, that seems like it adds extra complexity just for this single case. Yeah. I've dropped the idea personally -- the suggestion that the table owner can provide a SECURITY DEFINER procedure to do the TRUNCATE if he wants to allow others to do it seems to me to cover the

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-24 Thread Bruce Momjian
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

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-22 Thread A.M.
The author doesn't mention why he got a 600x increase- perhaps he bypassed the delete triggers which was OK for his situation. I don't like the notion that an optimization requires additional privileges...why not detect an unqualified delete and call truncate instead IFF there are no delete tri

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-22 Thread Robert Treat
On Tue, 2005-02-22 at 14:00, Tom Lane wrote: > "Keith Worthington" <[EMAIL PROTECTED]> writes: > > I have just discovered that I can speed up one of my functions by a factor > > of > > 600 by changing an unqualified DELETE to a TRUNCATE. Unfortunately, the > > function is run by multiple users an

Re: [HACKERS] [NOVICE] Question on TRUNCATE privleges

2005-02-22 Thread Tom Lane
"Keith Worthington" <[EMAIL PROTECTED]> writes: > I have just discovered that I can speed up one of my functions by a factor of > 600 by changing an unqualified DELETE to a TRUNCATE. Unfortunately, the > function is run by multiple users and I get the error message >"TESTDB=> TRUNCATE inventor