Received: from mailserv.hub.org (mailserv.hub.org [216.126.84.253]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA2DN2q09306 for ; Fri, 2 Nov 2001 08:23:02 -0500 (EST) (envelope-from olebedev@waterford.org) Received: from mail1.waterford.org (mail1.waterford.org [205.124.117.6]) by mailserv.hub.org (8.11.4/8.11.4) with ESMTP id fA1Ms2f39076 for ; Thu, 1 Nov 2001 17:54:02 -0500 (EST) (envelope-from olebedev@waterford.org) Received: from waterford.org ([205.124.138.93]) by mail1.waterford.org (Netscape Messaging Server 3.56) with ESMTP id 410 for ; Thu, 1 Nov 2001 15:44:35 -0700 Message-ID: <3BE1D713.71B98EC3@waterford.org> Date: Thu, 01 Nov 2001 16:13:23 -0700 From: Oleg Lebedev X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Postgres SQL Mailing List Subject: Re: table permissions References: <3BE1B8CC.38221E54@waterford.org> <27365.1004654107@sss.pgh.pa.us> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Archive-Number: 200111/31 X-Sequence-Number: 5416 Tom, you were right, some of the tables were owned by oleg. I changed it and now it works fine. So, in order for the table to be updated successfully, it's owner and updating user must have permissions to do that, right? thanks a lot, Oleg Tom Lane wrote: > Oleg Lebedev writes: > > I have a superuser root and a regular user oleg. I am trying to insert a > > new row in table Set, which references table Activity, being logged in > > as root. I get an error saying: > > activity: Permission denied. > > This is very weird because root has all the permissions on every table > > in the database. Even more strange is that as soon as I grant DELETE > > privilege to user oleg, the problem disappears and I can add a row to > > the Set table. > > Evidently the update is being done under privileges of user oleg. > Are you using a view, rule, function, trigger, etc somewhere in there? > I doubt this would happen with a straightforward INSERT typed at the > command line, but if the insert command is in a rule or function owned > by oleg, the game is different ... > > regards, tom lane