Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 57841B5DDEA for ; Mon, 12 Sep 2011 10:44:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 42113-10 for ; Mon, 12 Sep 2011 13:44:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from srv3.pob.com (srv3.pob.com [80.252.104.229]) by mail.postgresql.org (Postfix) with ESMTP id 8B1DAB5F704 for ; Mon, 12 Sep 2011 10:33:05 -0300 (ADT) Received: from localhost (p57BCE227.dip.t-dialin.net [87.188.226.39]) by srv3.pob.com (Postfix) with ESMTP id A64C76F90C for ; Mon, 12 Sep 2011 15:03:43 +0200 (CEST) Date: Mon, 12 Sep 2011 15:03:41 +0200 From: Rainer Leo Reply-To: Rainer Leo Organization: workfile Datenbankservice X-Priority: 3 (Normal) Message-ID: <467293622.20110912150341@workfile.de> To: pgsql-admin@postgresql.org Subject: Best procedure for restricted access MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable X-Antivirus: avast! (VPS 110912-0, 12.09.2011), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.5 tagged_above=-10 required=5 tests=BAYES_05=-0.5 X-Spam-Level: X-Archive-Number: 201109/65 X-Sequence-Number: 38302 Hello, I have been asked to configure a database role to be used for ODBC access. So far I have done this: CREATE ROLE odbc_user LOGIN ENCRYPTED PASSWORD 'bar' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE; REVOKE ALL ON DATABASE foo FROM odbc_user; REVOKE CREATE ON SCHEMA public FROM public; GRANT SELECT ON v_sales TO odbc_user; When I try: foo-> SELECT * FROM customers; access is denied as expected foo->\d baz I see table definitions. How can I restrict the role "odbc_user" to just "SELECT whatever FROM v_sales;" and nothing else? Any help would be very appreciated. Regards, Rainer Leo workfile Datenbankservice =20 Bocksberg 20c =20 D-22395 Hamburg=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Fon: 040.60 44 90 41 Fax: 040.34 92 61 08 www.workfile.de