pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: Anderson Alves de Albuquerque <andersonaa@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: No create table
Date: Fri, 27 Jul 2007 05:03:53 -0400
Message-ID: <20070727090353.GG2550@alvh.no-ip.org> (raw)
In-Reply-To: <9b3f75f0707260856u66b37b91w5a842f6d0b6dc6ec@mail.gmail.com>
References: <9b3f75f0707260856u66b37b91w5a842f6d0b6dc6ec@mail.gmail.com>

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



view thread (5+ messages)  latest in thread

Message-ID: <20070727090353.GG2550@alvh.no-ip.org>
Permalink:  ../20070727090353.GG2550@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20070727090353.GG2550@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alvherre@commandprompt.com, andersonaa@gmail.com
  Subject: Re: No create table
  In-Reply-To: <20070727090353.GG2550@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox