X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 2CBFED1BB1E for ; Sat, 23 Aug 2003 13:56:00 -0300 (ADT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 57590-08 for ; Sat, 23 Aug 2003 13:55:50 -0300 (ADT) Received: from web20809.mail.yahoo.com (web20809.mail.yahoo.com [216.136.226.198]) by svr1.postgresql.org (Postfix) with SMTP id E428DD1D13B for ; Sat, 23 Aug 2003 13:55:44 -0300 (ADT) Message-ID: <20030823165544.84475.qmail@web20809.mail.yahoo.com> Received: from [68.105.48.176] by web20809.mail.yahoo.com via HTTP; Sat, 23 Aug 2003 09:55:44 PDT Date: Sat, 23 Aug 2003 09:55:44 -0700 (PDT) From: Jeff Eckermann Subject: Re: Delete denied? To: josh@agliodbs.com, pgsql-sql@postgresql.org In-Reply-To: <200308221624.13158.josh@agliodbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/286 X-Sequence-Number: 14902 --- Josh Berkus wrote: > Stephan, Tom: > > Hey, I have a function which can involve some > records being deleted at the > end. The user calling the function has permission > to delete records (and > I've tested this), but when I run the function I get > "permission denied". > I had a similar weird problem recently, also with 7.2.4. Whether the two problems are related I can't tell, but... Situation: user a updates table1 (owned by a), kicks off a trigger which updates table2 (owned by user b). Wouldn't work. I tried every ownership and permission combination that I could think of without success, before succeeding by doing a "grant all on table2 to a". Since the table access is all mediated through the application I was not worried about the "all", but the question remains: why would "grant all" permit updates, when "grant update" would not? > Any clue? I remember in 7.1.x that you couldn't > delete records in a function, > but this is on 7.2.4. > > Contributing could be that the table holding the > deleted records is a child > table with an "ON CASCADE DELETE" of one of the > tables being updated > elsewhere in the function. And the function works > if called by the owner of > the table (and the function). > > -- > -Josh Berkus > Aglio Database Solutions > San Francisco > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com