Re: Prevent users to drop triggers applied on table

From: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
To: dipti shah <shahdipti1980(at)gmail(dot)com>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Prevent users to drop triggers applied on table
Date: 2010-04-01 09:33:44
Message-ID: F4C238FB-3AFD-4EE1-9359-A461466EACEB@solfertje.student.utwente.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1 Apr 2010, at 9:52, dipti shah wrote:

> Yah...that's correct but I am wondering if someone out there knows work around to this.
>
> I could make my table owner to postgres user but then is there any way original user can drop the table. I want original users should allow to drop their table.

If you want to give the user DROP TABLE rights, he will also need to be able to drop the triggers and such on that table.

If you want to work around that you'll need to take the same approach with which you created those tables.

Having the tables owned by a more powerful user will help with that, but in your situation I think the postgres superuser may be a bit too powerful. You're probably better off creating a non-superuser role for this purpose.

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.

!DSPAM:737,4bb4688c10419781048118!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Nikhil G. Daddikar 2010-04-01 09:35:56 Re: "1-Click" installer problems
Previous Message John R Pierce 2010-04-01 09:31:52 Re: prevent connection using pgpass.conf