Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 7C298B5DBFC for ; Mon, 12 Sep 2011 10:16:23 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 90571-02 for ; Mon, 12 Sep 2011 13:16:12 +0000 (UTC) X-Greylist: delayed 00:12:27.065596 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 4CF61B5DC07 for ; Mon, 12 Sep 2011 10:16:12 -0300 (ADT) Received: from localhost (p57BCE227.dip.t-dialin.net [87.188.226.39]) by srv3.pob.com (Postfix) with ESMTP id 41E606F927 for ; Mon, 12 Sep 2011 15:16:11 +0200 (CEST) Date: Mon, 12 Sep 2011 15:16:09 +0200 From: Rainer Leo Organization: workfile Datenbankservice X-Priority: 3 (Normal) Message-ID: <746856965.20110912151609@workfile.de> To: pgsql-admin@postgresql.org Subject: Best procedure for restricted access Resent-from: Rainer Leo 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 Resent-Message-Id: <20110912131611.41E606F927@srv3.pob.com> Resent-Date: Mon, 12 Sep 2011 15:16:11 +0200 (CEST) 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/64 X-Sequence-Number: 38301 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