pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Tena Sakai <tsakai@gallo.ucsf.edu>
Cc: pgsql-admin@postgresql.org
Subject: Re: grant question
Date: Sat, 28 Feb 2009 13:04:48 -0700
Message-ID: <dcc563d10902281204q55c8c2bepc59bc757467dcf35@mail.gmail.com> (raw)
In-Reply-To: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F7AD@egcrc-ex01.egcrc.org>
References: <FE44E0D7EAD2ED4BB2165071DB8E328C0378F7AD@egcrc-ex01.egcrc.org>

On Sat, Feb 28, 2009 at 12:56 PM, Tena Sakai <tsakai@gallo.ucsf.edu> wrote:
> Hi Everybody,
>
> I want to issue a command:
>
>   grant select on schema_Z to user_a;
>
> so that the user_a can look at all tables in schema_Z.
> Sadly, what I get is:
>   ERROR:  relation "schema_Z" does not exist

Two problems.  1: you don't grant select on schemas, you grant it on
tables.  2: case folding.  If you're gonna use a name "schema_Z" then
you have to quote it, because it's mixed case, not all lower.

> I tried:
>
>   grant select on schema_Z.* to user_a;

Sorry no wildcarding on grant (At least not yet).  You need to grant
it for each table.  Note that instead of granting it to a user, you
should grant it to a role, then give membership to that role to the
user.



view thread (12+ messages)  latest in thread

Message-ID: <dcc563d10902281204q55c8c2bepc59bc757467dcf35@mail.gmail.com>
Permalink:  ../dcc563d10902281204q55c8c2bepc59bc757467dcf35@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10902281204q55c8c2bepc59bc757467dcf35@mail.gmail.com

 · 

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: scott.marlowe@gmail.com, tsakai@gallo.ucsf.edu
  Subject: Re: grant question
  In-Reply-To: <dcc563d10902281204q55c8c2bepc59bc757467dcf35@mail.gmail.com>

* 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