Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 3BFC62E32AD for ; Fri, 14 Dec 2007 11:25:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 50951-05 for ; Fri, 14 Dec 2007 11:25:31 -0400 (AST) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id A35452E32A9 for ; Fri, 14 Dec 2007 11:25:28 -0400 (AST) Received: from vanquish.pitbpa0.priv.collaborativefusion.com (vanquish.pitbpa0.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Fri, 14 Dec 2007 10:25:26 -0500 id 00056434.4762A066.0001721A Date: Fri, 14 Dec 2007 10:25:26 -0500 From: Bill Moran To: "Roberts, Jon" Cc: "'pgsql-performance@postgresql.org'" Subject: Re: viewing source code Message-Id: <20071214102526.2bc08bc4.wmoran@collaborativefusion.com> In-Reply-To: <1A6E6D554222284AB25ABE3229A927621129EA@nrtexcus702.int.asurion.com> References: <1A6E6D554222284AB25ABE3229A927621129EA@nrtexcus702.int.asurion.com> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/212 X-Sequence-Number: 28028 In response to "Roberts, Jon" : > Is it possible yet in PostgreSQL to hide the source code of functions from > users based on role membership? I would like to avoid converting the code > to C to secure the source code and I don't want it obfuscated either. > > In an ideal world, if a user can't modify a function, he/she shouldn't be > able to see the source code. If the user can execute the function, then the > user should be able to see the signature of the function but not the body. I doubt that's going to happen. Mainly because I disagree completely with your ideal world description (any user who can execute a function should have the right to examine it to see what it actually does). I suspect that others would agree with me, the result being that there's no universally-agreed-on approach. As a result, what _really_ needs to be done is an extra permission bit added to functions so administrators can control who can view the function body. -- Bill Moran Collaborative Fusion Inc. http://people.collaborativefusion.com/~wmoran/ wmoran@collaborativefusion.com Phone: 412-422-3463x4023