Re: User Permissions

From: "SHELTON,MICHAEL (Non-HP-Boise,ex1)" <michael_shelton(at)non(dot)hp(dot)com>
To: "'Braum Meakes'" <braum(at)telus(dot)net>, pgsql-sql(at)postgresql(dot)org
Subject: Re: User Permissions
Date: 2002-01-17 23:00:55
Message-ID: FB60DFB2C0E24449AC0C21F743B935410150F990@xboi02.boi.hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)telus(dot)net]
Sent: Thursday, January 17, 2002 3:28 PM
To: pgsql-sql(at)postgresql(dot)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(at)postgresql(dot)org)

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2002-01-17 23:12:44 Re: User Permissions
Previous Message Braum Meakes 2002-01-17 22:27:39 User Permissions