Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8B6592E07B2 for ; Fri, 21 Dec 2007 17:19:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 12081-04 for ; Fri, 21 Dec 2007 17:19:50 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 779462E0325 for ; Fri, 21 Dec 2007 17:19:53 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lBLLJp0w012278; Fri, 21 Dec 2007 16:19:51 -0500 (EST) To: Andrew Sullivan cc: pgsql-hackers@postgresql.org Subject: Re: function body actors (was: [PERFORM] viewing source code) In-reply-to: <20071221205619.GD3864@crankycanuck.ca> References: <26811.1198215605@sss.pgh.pa.us> <20071221164826.GI10918@crankycanuck.ca> <10257.1198263464@sss.pgh.pa.us> <20071221205619.GD3864@crankycanuck.ca> Comments: In-reply-to Andrew Sullivan message dated "Fri, 21 Dec 2007 15:56:19 -0500" Date: Fri, 21 Dec 2007 16:19:51 -0500 Message-ID: <12277.1198271991@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/812 X-Sequence-Number: 112101 Andrew Sullivan writes: > Hmm; this may be exactly part of the problem, though. It seems there are > two possible cases in play: > 1. Protect the content in the database (in this case, function bodies) > from _all_ users on a given server. This is a case where you want to > protect (say) your function body from your users, because you have a > closed-source application. > 2. Protect the content of a field from _some_ users on a given system, > based on the permissions they hold. This is roughly analagous to others not > being able to look in the table I created, because I haven't GRANTed them > permission. I would argue that (2) is reasonably well served today by setting up separate databases for separate users. The people who are complaining seem to want to send out a set of functions into a hostile environment, which is surely case (1). regards, tom lane