Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 281929FB897 for ; Thu, 24 May 2007 06:15:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 77681-06 for ; Thu, 24 May 2007 06:15:15 -0300 (ADT) X-Greylist: delayed 00:32:32.870054 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 675129FB8C3 for ; Thu, 24 May 2007 06:15:18 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from infbssys.ips.cs.tu-bs.de (infbssys.ips.cs.tu-bs.de [134.169.32.1]) by svr4.postgresql.org (Postfix) with ESMTP id 6EB995AF024 for ; Thu, 24 May 2007 08:42:43 +0000 (GMT) Received: from is38 (is38.idb.cs.tu-bs.de [134.169.32.148]) by infbssys.ips.cs.tu-bs.de (8.13.6+Sun/8.13.6) with ESMTP id l4O8geYl022695 for ; Thu, 24 May 2007 10:42:40 +0200 (CEST) From: Thomas Mack To: pgsql-admin@postgresql.org Subject: Role based database access Date: Thu, 24 May 2007 10:42:40 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705241042.40007.mack@ifis.cs.tu-bs.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200705/263 X-Sequence-Number: 25583 Hello! I face a problem here with restricting access to databases to the owners of the database (Postgres 8.1.4). We would like any postgres user to have database access restricted to their own databases only. This is so, as we use postgres for educational purposes. I looked into pg_hba.conf, but unfortunately, when restricting database access in the database field, the NAME(!) of the database is concerned, which we do not restrict. Any user can create as many databases as needed, and the name may be choosen freely. The 'user' field does not help in this either. So is there any chance to achieve what we need without revoking the 'create database' permission and pre-creating the databases for all our users? Thanks, Thomas Mack