Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA12945 for ; Sat, 19 Feb 2000 10:16:44 -0500 (EST) (envelope-from Inoue@tpf.co.jp) Received: from mcadnote1 (ppm139.noc.fukui.nsk.ne.jp [210.161.188.58]) by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP id AAA03868; Sun, 20 Feb 2000 00:14:12 +0900 From: "Hiroshi Inoue" To: "Constantin Teodorescu" , "Tom Lane" Cc: "Ed Loehr" , "PostgreSQL Interfaces" Subject: RE: [INTERFACES] A question on triggers Date: Sun, 20 Feb 2000 00:15:29 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-reply-to: <38AC3840.EB320B34@flex.ro> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > -----Original Message----- > From: owner-pgsql-interfaces@postgreSQL.org > [mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of > Constantin Teodorescu > > Tom Lane wrote: > > > > > But wouldn't be nice if PostgreSQL could offer a more elegant > solution? > > > > Can't you do it with the normal GRANT/REVOKE access-control mechanism? > > No. It didn't worked, that was my first idea! > > > I'm pretty sure that for rules (views), the access rights for queries > > issued within the rule are checked based on the owner of the rule, not > > the user who invoked the rule. Triggers ought to work the same way, > > though I haven't tried it. So you could make the trigger function and > > the protected table owned by the same user, and then not grant write > > permission on that table to anyone else. > > It seems it didn't work! > Hmm,it seems to work for views(rules) but it doesn't work for functions. It should work for stored procedures,shouldn't it ? Regards. Hiroshi Inoue Inoue@tpf.co.jp