Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 348F39FB4CF for ; Fri, 27 Jul 2007 11:48:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 50881-09 for ; Fri, 27 Jul 2007 11:48:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by postgresql.org (Postfix) with ESMTP id D8C459FB44A for ; Fri, 27 Jul 2007 11:48:45 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id h29so768207wxd for ; Fri, 27 Jul 2007 07:48:44 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=rhERs/uWxFLB3KFbLmVJxf4rHx7bunOAIAfs3JlZoVLAKgFt3fpnEg+v2E64LoEktaRImxm5+n2W5w0APbaWxMBshak5ldfBxPMfoGGOn8V8Fl8VqJchXBohaK/yZ2OZk8QG1yvzBy0UMyENCD6/fN2fzM9JzlKuojyoJiwDpK4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ljeeOYT41X3RgKXHmd4OLL1BiH+GO99O2d8tmJVZLQW2K6Mzyz6B1KHwiz6/E7zUoQEa8TQNFqXqmAcDFmiJvV7IovcTQmFG6m/rlOiN5E+S2Fbtw81sPbXRKQqCiXfzs7Z9YbKH656sWyyAA1+V7U6gsBF9yGSGLjx9qpqIxoI= Received: by 10.100.12.18 with SMTP id 18mr2757590anl.1185547724560; Fri, 27 Jul 2007 07:48:44 -0700 (PDT) Received: by 10.100.191.10 with HTTP; Fri, 27 Jul 2007 07:48:44 -0700 (PDT) Message-ID: <9b3f75f0707270748o6152398fw528149000be61d34@mail.gmail.com> Date: Fri, 27 Jul 2007 11:48:44 -0300 From: "Anderson Alves de Albuquerque " To: "Anderson Alves de Albuquerque" , pgsql-admin@postgresql.org Subject: Re: No create table In-Reply-To: <20070727090353.GG2550@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3843_26726628.1185547724315" References: <9b3f75f0707260856u66b37b91w5a842f6d0b6dc6ec@mail.gmail.com> <20070727090353.GG2550@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/311 X-Sequence-Number: 26292 ------=_Part_3843_26726628.1185547724315 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline When I use revoke that you send, I revoke permission in all database. Is there possible I use this revoke in one BD only? On 7/27/07, Alvaro Herrera wrote: > > Anderson Alves de Albuquerque wrote: > > I need to use a user that can not have permission to create table in one > > BD. > > > > I use revoke, I tray with "revoke all on database XXX to|from > USERNAME;", > > but I don't have success. > > > > Could someone help me? > > You have to revoke permissions from the _schema_, not from databases. > Say, > > revoke all on schema PUBLIC FROM PUBLIC; > revoke all on schema PUBLIC FROM username; > > You have to remove from PUBLIC because otherwise the user will still > have permissions to create via that privilege, even if you take his own > permission away (if he had one at all actually). > > -- > Alvaro Herrera > http://www.CommandPrompt.com/ > PostgreSQL Replication, Consulting, Custom Development, 24x7 support > -- . ------=_Part_3843_26726628.1185547724315 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
 
 
 When I use revoke that you send, I revoke  permission in all database. Is there possible I use this revoke in one BD only?

 
On 7/27/07, Alvaro Herrera <alvherre@commandprompt.com> wrote:
Anderson Alves de Albuquerque  wrote:
> I need to use a user that can not have permission to create table in one
> BD.
>
> I use revoke,  I tray with "revoke all on database XXX to|from USERNAME;",
> but I don't have success.
>
> Could someone help me?

You have to revoke permissions from the _schema_, not from databases.
Say,

revoke all on schema PUBLIC FROM PUBLIC;
revoke all on schema PUBLIC FROM username;

You have to remove from PUBLIC because otherwise the user will still
have permissions to create via that privilege, even if you take his own
permission away (if he had one at all actually).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



--
.
------=_Part_3843_26726628.1185547724315--