Re: User Permissions - Mailing list pgsql-sql

From SHELTON,MICHAEL (Non-HP-Boise,ex1)
Subject Re: User Permissions
Date
Msg-id FB60DFB2C0E24449AC0C21F743B935410150F990@xboi02.boi.hp.com
Whole thread Raw
In response to User Permissions  (Braum Meakes <braum@telus.net>)
Responses Re: User Permissions
List pgsql-sql
I don't have an answer for your issue, just a question on your process:

Why do you lock the table instead of using a transaction?  The transaction
would prevent the data from changing until you either applied your changes
(insert or update) and commited the transaction or rolled back the
transaction (due to an error or something).

Mike

-----Original Message-----
From: Braum Meakes [mailto:braum@telus.net]
Sent: Thursday, January 17, 2002 3:28 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] User Permissions


Hello,

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?

I am unable to lock the table as a standard user at any time, not just when 
running the function.

Thanks in advance,

Braum Meakes


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command   (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


pgsql-sql by date:

Previous
From: Braum Meakes
Date:
Subject: User Permissions
Next
From: Braum Meakes
Date:
Subject: Re: User Permissions