Re: [HACKERS] Truncate Permission

2007-06-13 Thread Nicholas Barr
* Zeugswetter Andreas ADI SD ([EMAIL PROTECTED]) wrote: Wouldn't it be far more logical to decide that if a user has the permissions to do a DELETE FROM table; then they have permission to do a TRUNCATE? Why make an additional permission? Truncate doesn't fire ON DELETE triggers.

Re: [HACKERS] Truncate Permission

2007-06-13 Thread Tom Lane
Nicholas Barr [EMAIL PROTECTED] writes: At the moment it seems as if a single 32 bit integer is used for the permissions, with the top half being the grantable rights. I assume I would need to extend this into two 32 bit integers, or one 64 bit integer? Two 32-bit please. We are still trying

Re: [HACKERS] Truncate Permission

2007-06-13 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Nicholas Barr [EMAIL PROTECTED] writes: At the moment it seems as if a single 32 bit integer is used for the permissions, with the top half being the grantable rights. I assume I would need to extend this into two 32 bit integers, or one 64 bit integer?

Re: [HACKERS] Truncate Permission

2007-06-11 Thread Ewald Geschwinde
Yes, there is a use-case for it. If you don't have triggers or transactional concerns on the table and you want users to be able to truncate tables while not allowing them to do things like change the table structure. I proposed a patch a while ago to implement a seperate permission for

Re: [HACKERS] Truncate Permission

2007-06-11 Thread Martijn van Oosterhout
On Mon, Jun 11, 2007 at 09:40:08AM +0200, Ewald Geschwinde wrote: My problem is that some users don't have access to change the structure but they wanted to delete all data from the table they try truncate - does not work because not the owner so they make a delete from a really big table

Re: [HACKERS] Truncate Permission

2007-06-11 Thread Heikki Linnakangas
Martijn van Oosterhout wrote: On Mon, Jun 11, 2007 at 09:40:08AM +0200, Ewald Geschwinde wrote: My problem is that some users don't have access to change the structure but they wanted to delete all data from the table they try truncate - does not work because not the owner so they make a delete

Re: [HACKERS] Truncate Permission

2007-06-11 Thread Zeugswetter Andreas ADI SD
Wouldn't it be far more logical to decide that if a user has the permissions to do a DELETE FROM table; then they have permission to do a TRUNCATE? Why make an additional permission? Truncate doesn't fire ON DELETE triggers. Yes, but it would imho be ok if there are'nt any on delete

Re: [HACKERS] Truncate Permission

2007-06-11 Thread Stephen Frost
* Zeugswetter Andreas ADI SD ([EMAIL PROTECTED]) wrote: Wouldn't it be far more logical to decide that if a user has the permissions to do a DELETE FROM table; then they have permission to do a TRUNCATE? Why make an additional permission? Truncate doesn't fire ON DELETE

Re: [HACKERS] Truncate Permission

2007-06-10 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Nick Barr [EMAIL PROTECTED] writes: I was looking to start development on the following TODO entry. Add a separate TRUNCATE permission Is there actually a use-case for that? It seems like mostly pointless complication to me. (Note that in the role

Re: [HACKERS] Truncate Permission

2007-06-09 Thread Tom Lane
Nick Barr [EMAIL PROTECTED] writes: I was looking to start development on the following TODO entry. Add a separate TRUNCATE permission Is there actually a use-case for that? It seems like mostly pointless complication to me. (Note that in the role world, one can effectively have a table owned