Received: from priv-edtnes12-hme0.telusplanet.net (fepout4.telus.net [199.185.220.239]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0HNKZV30454 for ; Thu, 17 Jan 2002 18:20:35 -0500 (EST) (envelope-from braum@telus.net) Received: from computer.telus.net ([209.53.225.59]) by priv-edtnes12-hme0.telusplanet.net (InterMail vM.5.01.04.01 201-253-122-122-101-20011014) with ESMTP id <20020117232036.EXQO28767.priv-edtnes12-hme0.telusplanet.net@computer.telus.net> for ; Thu, 17 Jan 2002 16:20:36 -0700 Message-Id: <5.1.0.14.0.20020117151810.00a5ac70@pop.telus.net> X-Sender: a3a48144@pop.telus.net X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 17 Jan 2002 15:20:12 -0800 To: pgsql-sql@postgresql.org From: Braum Meakes Subject: Re: User Permissions In-Reply-To: References: <5.1.0.14.0.20020117141918.00a49e80@pop.telus.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Archive-Number: 200201/205 X-Sequence-Number: 6291 That's got it. Thanks! At 06:12 PM 17/01/02 -0500, you wrote: >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@gmx.net