Received: from sss.pgh.pa.us (sss.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f484uWA40302 for ; Tue, 8 May 2001 00:56:32 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.3/8.11.3) with ESMTP id f484txR27414; Tue, 8 May 2001 00:55:59 -0400 (EDT) To: Peter Eisentraut cc: Kyle , pgsql-sql@postgresql.org Subject: Re: RI permission problem In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Mon, 07 May 2001 21:36:47 +0200" Date: Tue, 08 May 2001 00:55:59 -0400 Message-ID: <27411.989297759@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200105/54 X-Sequence-Number: 2855 Peter Eisentraut writes: > Kyle writes: >> Shouldn't the select access to the view trickle down to subordinate select functions? > I would think not. I agree with Peter. If user A creates a view that includes a call of a function written by user B, does user A want user B's function to run with all of user A's permissions? Not if he's adequately paranoid. The function could do all sorts of damage above and beyond its advertised task. The correct solution to this is to allow a function to run with its owner's permissions (if the owner wants to mark it setuid). In your example, func_v1 and func_v2 should have permission to read atab_v1 and atab_v2 in their own right, independently of who calls them. This does bring up the thought that we might like to control who can call func_v1 and func_v2, however (by analogy to execute permissions on Unix programs). We have ACLs for tables, but none yet for functions... regards, tom lane