Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 77D93B5DC0C for ; Fri, 22 Jul 2011 14:43:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 72488-03 for ; Fri, 22 Jul 2011 17:43:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail25.opentransfer.com (mail25.opentransfer.com [76.162.254.25]) by mail.postgresql.org (Postfix) with SMTP id 36153B5DBF2 for ; Fri, 22 Jul 2011 14:43:22 -0300 (ADT) Received: (qmail 28362 invoked by uid 399); 22 Jul 2011 17:43:16 -0000 Received: from unknown (HELO ?192.168.0.16?) (juanrcuervo@quality-telecom.net@190.1.135.54) by mail25.opentransfer.com with SMTP; 22 Jul 2011 17:43:16 -0000 Message-ID: <4E29B6B6.3020309@quality-telecom.net> Date: Fri, 22 Jul 2011 12:43:18 -0500 From: "Juan Cuervo (Quality Telecom)" Organization: Quality Telecom User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Scott Marlowe CC: pgsql-admin@postgresql.org Subject: Re: revoked permissions on table still allows users to see table's structure References: <4E28BF6E.8090302@quality-telecom.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201107/172 X-Sequence-Number: 37951 In my opinion, that is precicely what privileges where created for: in order to restrict what people with database's access can do. As I see it, it would make a lot of sense to have something like a 'view_design' privilege on database objects. Imagine you own a software development company, and decides to base the company's product on Postgresql databases. Such a company surely dont want to expose his database design to its customers, but in some time might want to provide 'select' access to some users, so they can pull data to external datamining or data analisys tools, for example. If this is not possible in postgresql right now, then all users with connect privilege will be able to see not only the table's structure, but also the stored procedures code, wich in many cases, stores a business logic or know-how. I believe postgresql is the best open source RDBMS, but I see this behavior of postgresql as a limitation, and the solution of forbiding users the database's access is also radical and limiting. I hace found several posts related to this issue, and seems like nothing have been done, maybe because this is not considered necessary, or just becasuse the product works fine this way. However, If there are others who agree with me, I encourage them to help me propose or develop a solution to this issue, and probably post it as a patch or optional improvement to the postgresql product. Regards, Juan R. Cuervo Soto Quality Telecom Ltd www.quality-telecom.net PBX : (575) 3693300 CEL : (57) 301-4174865 El 21/07/2011 08:48 p.m., Scott Marlowe escribió: > On Thu, Jul 21, 2011 at 6:08 PM, Juan Cuervo (Quality Telecom) > wrote: >> Hi All >> >> I'm new to the list, but have a few years as postgres user. I want to share >> what I consider a rare behavior of postgresql regarding database object's >> premissions: >> >> I have noticed that there is no way (at least no one I know) to prevent a >> user from seeing the table's structures in a database. >> >> Is this a normal behavior of the product ? > Yep. Completely normal. > >> Is there a way to prevent a user from seeing my table's, procedure's and >> function's code ? > Don't let them connect to the db? That's all I can think of. >