Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 29B9C9FB287 for ; Fri, 27 Jul 2007 11:21:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 10669-09 for ; Fri, 27 Jul 2007 11:21:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.244]) by postgresql.org (Postfix) with ESMTP id 5D0029FB1FE for ; Fri, 27 Jul 2007 11:21:45 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c36so163485ana for ; Fri, 27 Jul 2007 07:21: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=mVKJRJXUd7fIRdlBLnMY1Wy2JdnqxklUfHFvWjA44zHAlCpDm2v+/+JmSquM+arzqFvZyEYlVhWTXEFUZgyZZk1/9Ky+LroC8XL7EukStlk9xOC61V4ssK+u7cBB8wG9n2zNT7ULIwwqaEiYPxfaGL7nL4bC+aFivSddng/PhnE= 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=FUdrci9dvVfRp1J6BJpOav3267vLo7TGtX0gtvCQR+9paXqNHLrZd+ftMmuxsk+Ljh4dFnr7QIAIV3rY38rCBD+STu/pt/Z6GMvTdgQl0TT2dJv1lyEECFtTNGMOTZBeMJNn9N+wmkSps+K7DJeRjQk+ww2Lhom5wvYnXUfUMbo= Received: by 10.100.106.5 with SMTP id e5mr2695107anc.1185546103964; Fri, 27 Jul 2007 07:21:43 -0700 (PDT) Received: by 10.100.191.10 with HTTP; Fri, 27 Jul 2007 07:21:43 -0700 (PDT) Message-ID: <9b3f75f0707270721rd6b0a99q99bbc977b6a70ec7@mail.gmail.com> Date: Fri, 27 Jul 2007 11:21:43 -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_3382_11850131.1185546103863" References: <9b3f75f0707260856u66b37b91w5a842f6d0b6dc6ec@mail.gmail.com> <20070727090353.GG2550@alvh.no-ip.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/309 X-Sequence-Number: 26290 ------=_Part_3382_11850131.1185546103863 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I try with "revoke all on schema PUBLIC FROM PUBLIC;", but after give GRANT SELECT user can't use SELECT. When I use "revoke CREATE on schema PUBLIC FROM PUBLIC;" and give GRANT SELECT user can use SELECT. 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_3382_11850131.1185546103863 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
 
 
 I try with "revoke all on schema PUBLIC FROM PUBLIC;", but after give GRANT SELECT user can't use SELECT. When I use "revoke CREATE on schema PUBLIC FROM PUBLIC;" and give GRANT SELECT user can use SELECT.


 
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_3382_11850131.1185546103863--