Re: Strange Grant behavior in postgres 8.3

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Clemens Schwaighofer <clemens(dot)schwaighofer(at)tequila(dot)jp>
Cc: John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Strange Grant behavior in postgres 8.3
Date: 2009-02-18 08:42:17
Message-ID: dcc563d10902180042m33f7cd17h248a1c8a2a47b787@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Feb 17, 2009 at 9:20 PM, Clemens Schwaighofer
<clemens(dot)schwaighofer(at)tequila(dot)jp> wrote:

> But yesterday I run in some issues with table ownership and thought if I
> just give the user all rights for the DB, he should have all rights to
> the tables too.

Try granting select on a database and you will get this:

grant select on database smarlowe to stan;
ERROR: invalid privilege type SELECT for database

OTOH,

grant connect on database smarlowe to stan;
GRANT

But even easier is to use the db owner as the ROLE instead of as a
user, and just

alter group guywhoownsthedb add user guywhodoesnt;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-02-18 09:13:27 Re: Download link for 'Bristlecone'
Previous Message Albe Laurenz 2009-02-18 08:39:35 Re: Strange Grant behavior in postgres 8.3