Re: User Permissions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Braum Meakes <braum(at)telus(dot)net>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: User Permissions
Date: 2002-01-17 23:12:44
Message-ID: Pine.LNX.4.30.0201171810290.725-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Braum Meakes writes:

> I have a function that I've written in plpgsql. In it I lock a table
> before selecting a value and, depending on the value, either update the
> record selected or insert a new one. It works perfectly when I run it as a
> super-user or as the owner of the table. However, as a standard user I am
> unable to lock the table. How do I either run the function at the owners
> level, or change the permissions on the table to allow the user to lock it?

Depending on what lock method you chose, you probably need to have UPDATE
permission on the table. So, as the owner of the table, execute

GRANT UPDATE ON tablename TO yourusername;

For even higher lock-levels you need to be the table owner, but you
probably don't want to use those anyway.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Braum Meakes 2002-01-17 23:20:12 Re: User Permissions
Previous Message SHELTON,MICHAEL (Non-HP-Boise,ex1) 2002-01-17 23:00:55 Re: User Permissions