Search Postgresql Archives

Re: User with GRANTS only on Views. Lock table on function will work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/04/2010 13:24, Andre Lopes wrote:
> Hi,
> 
> I have a database were the users only can do operations using views,
> they have not access to physical tables. But I have a function with a
> lock on a physical table. Can I allow this users to run a function that
> locks a physical table?

You can create a function with SECURITY DEFINER, allowing it to be run
with the privileges of the users who created it rather than the user who
is running it. See here:

  http://www.postgresql.org/docs/8.4/static/sql-createfunction.html

Would this do what you need?

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@xxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux