Re: how do I grant select to one user for all tables in a DB?

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: Chris Angelico <rosuav(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: how do I grant select to one user for all tables in a DB?
Date: 2012-12-05 18:21:03
Message-ID: CAMkU=1wcm3ODzCB0mku6+K165shHhvCZsK9G-dxM3_QwrmCMhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 5, 2012 at 7:02 AM, Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com> wrote:
> Actually, maybe it didn't work. What's wrong with this picture...
>
>
> sde=# alter default privileges for user "select" grant select on tables to
> "select";

Remove the 'for user "select"'

What that does is make the default permissions apply only to tables
created *by* the user "select".

This is essentially a no-op, since the user that creates an object
already has privs on those objects. In fact, this usage should
probably generate a warning.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Cowell 2012-12-05 18:56:06 Re: Corrupt indexes on slave when using pg_bulkload on master
Previous Message icholy 2012-12-05 18:05:24 libpq - prevent automatic reconnect