Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0D0D62E0095 for ; Fri, 1 Feb 2008 00:09:52 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 75679-01-5 for ; Fri, 1 Feb 2008 00:09:44 -0400 (AST) Received: from smtp110.iad.emailsrvr.com (smtp110.iad.emailsrvr.com [207.97.245.110]) by postgresql.org (Postfix) with ESMTP id 508EE2E0120 for ; Thu, 31 Jan 2008 23:01:17 -0400 (AST) Received: from relay1.r1.iad.emailsrvr.com (localhost [127.0.0.1]) by relay1.r1.iad.emailsrvr.com (SMTP Server) with ESMTP id 62C1544D363; Thu, 31 Jan 2008 22:01:15 -0500 (EST) Received: by relay1.r1.iad.emailsrvr.com (Authenticated sender: chander-AT-otg-nc.com) with ESMTP id 2E9E544C007; Thu, 31 Jan 2008 22:01:15 -0500 (EST) Message-ID: <47A28B79.3080800@otg-nc.com> Date: Thu, 31 Jan 2008 22:01:13 -0500 From: Chander Ganesan User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Greg Cocks CC: "Obe, Regina" , PostgreSQL List - Novice Subject: Re: Can't get MS Access via ODBC (or MapServer) to 'see' the data unless the user is a 'super user'... References: <66F6CF82BF58CE4DB4285BE816B297E83548DA@tribble.SMStoller.com> <53F9CF533E1AA14EA1F8C5C08ABC08D202D977C6@ZDND.DND.boston.cob> <66F6CF82BF58CE4DB4285BE816B297E835496B@tribble.SMStoller.com> <53F9CF533E1AA14EA1F8C5C08ABC08D201979FFF@ZDND.DND.boston.cob> <66F6CF82BF58CE4DB4285BE816B297E8354971@tribble.SMStoller.com> In-Reply-To: <66F6CF82BF58CE4DB4285BE816B297E8354971@tribble.SMStoller.com> Content-Type: multipart/alternative; boundary="------------020304070006040701060309" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/1 X-Sequence-Number: 19937 This is a multi-part message in MIME format. --------------020304070006040701060309 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Greg Cocks wrote: > > I don't remember changing those... it is maybe because my 'production' > database is in the PUBLIC schema?? > The the schema that your tables are in wouldn't have any effect on the "system" rights granted to roles on the server (such as the login privilege or inheritance). > > > > (would like to change this as I have now read that PUBLIC schemas have > 'default' user rights for the logged in user rights that overrides > those that -- but have (manually) emulated the relationships in the > ODBC-linked tables in MS Access - to help in Query Manager, etc - and > don't want to set that up again, at least not right now! [aside -- I > am thinking a long term 'project' would be to write some VBA in Access > that grabs/tests (??) all the PK/FK relationships in the linked tables > and sets them up in the relationships in Access 'automagically'...; > and then maybe if I am feeling even braver something that sets the > lookup display controls in the Access linked tables based on the > FKs... although maybe they would not save on linked tables?]) > It's true that all users that can connect to a database have the CREATE right in the public schema, but you can revoke that right from public (and it's quite easy...(revoke create on schema public from public;), and if you want this to be applied by default for all new databases, just issue it in the template1 databases (this assumes that you always use template1 as your template) . Also, keep in mind that once an object is created in a schema, the owner is the only one with rights to that object...so while you could have rogue users creating objects (tables, sequences, indexes, etc.), they wouldn't be able to access tables (or data in those tables) unless rights had been granted to them. As such, the fact that your tables (a database is a superset of a schema, so your tables would be created in the public schema inside your database) are in the public schema shouldn't be much of an issue unless you granted the public role rights to them. -- Chander Ganesan Open Technology Group, Inc. One Copley Parkway, Suite 210 Morrisville, NC 27560 Phone: 877-258-8987/919-463-0999 http://www.otg-nc.com Ask me about our expert PostgreSQL & PostGIS Training delivered worldwide. --------------020304070006040701060309 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Greg Cocks wrote:  

I don’t remember changing those… it is maybe because my ‘production’ database is in the PUBLIC schema??

The the schema that your tables are in wouldn't have any effect on the "system" rights granted to roles on the server (such as the login privilege or inheritance).

 

(would like to change this as I have now read that PUBLIC schemas have ‘default’ user rights for the logged in user rights that overrides those that – but have (manually) emulated the relationships in the ODBC-linked tables in MS Access - to help in Query Manager, etc - and don’t want to set that up again, at least not right now! [aside – I am thinking a long term ‘project’ would be to write some VBA in Access that grabs/tests (??) all the PK/FK relationships in the linked tables and sets them up in the relationships in Access ‘automagically’…; and then maybe if I am feeling even braver something that sets the lookup display controls in the Access linked tables based on the FKs… although maybe they would not save on linked tables?])

It's true that all users that can connect to a database have the CREATE right in the public schema, but you can revoke that right from public (and it's quite easy...(revoke create on schema public from public;), and if you want this to be applied by default for all new databases, just issue it in the template1 databases (this assumes that you always use template1 as your template) .  Also, keep in mind that once an object is created in a schema, the owner is the only one with rights to that object...so while you could have rogue users creating objects (tables, sequences, indexes, etc.), they wouldn't be able to access tables (or data in those tables) unless rights had been granted to them.

As such, the fact that your tables (a database is a superset of a schema, so your tables would be created in the public schema inside your database) are in the public schema shouldn't be much of an issue unless you granted the public role rights to them.
-- 
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC  27560
Phone: 877-258-8987/919-463-0999
http://www.otg-nc.com
Ask me about our expert PostgreSQL & PostGIS Training delivered worldwide.
--------------020304070006040701060309--