pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
grant problem
2+ messages / 2 participants
[nested] [flat]

* grant problem
@ 2005-03-22 05:52  Rajarshi Mukherjee <mukherjee.rajarshi@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Rajarshi Mukherjee @ 2005-03-22 05:52 UTC (permalink / raw)
  To: pgsql-admin

Dear Sir/Madam,

I have a problem regarding grants in PG. It is as follows:

I wanted to grant execute on a function that updates a table.
But i got an ERROR: permission denied for relation <table_name>

Now i don't want to grant update on that table as i want all updates
to be done through the function, and no one should be able to update
it manually.

How can i achieve that?

thanks & Regards,

Rajarshi Mukherjee.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: grant problem
@ 2005-03-27 15:47  Bruno Wolff III <bruno@wolff.to>
  parent: Rajarshi Mukherjee <mukherjee.rajarshi@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2005-03-27 15:47 UTC (permalink / raw)
  To: Rajarshi Mukherjee <mukherjee.rajarshi@gmail.com>; +Cc: pgsql-admin

On Tue, Mar 22, 2005 at 11:22:07 +0530,
  Rajarshi Mukherjee <mukherjee.rajarshi@gmail.com> wrote:
> Dear Sir/Madam,
> 
> I have a problem regarding grants in PG. It is as follows:
> 
> I wanted to grant execute on a function that updates a table.
> But i got an ERROR: permission denied for relation <table_name>
> 
> Now i don't want to grant update on that table as i want all updates
> to be done through the function, and no one should be able to update
> it manually.
> 
> How can i achieve that?

Grant UPDATE access to the table to the owner of the function, create
the function with the SECURITY DEFINER access and give EXECUTE access
(you will want to revoke EXECUTE from public as that is the default for
functions) to the function to the users that should be able to use it.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-03-27 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22 05:52 grant problem Rajarshi Mukherjee <mukherjee.rajarshi@gmail.com>
2005-03-27 15:47 ` Bruno Wolff III <bruno@wolff.to>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox