Re: forcing table ownership

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Darin Perusich <Darin(dot)Perusich(at)ctg(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: forcing table ownership
Date: 2011-09-15 22:17:59
Message-ID: CABvLTWH1ZZs1wajxaqg=V-=jBkmuxxhuz-X=cLdG8koeU+=0dA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 15, 2011 at 1:59 PM, Darin Perusich <Darin(dot)Perusich(at)ctg(dot)com> wrote:

> I'm pretty much brand new to using postgres and the privilege structure
> is taking some getting used to, especially when coming from mysql. What
> I'm trying to accomplish is to have multiple users/roles connect to a
> database and have ALL privileges to do whatever they want. The problem
> I'm running into is that is user1 creates table1 nobody else has
> permissions to it since they are not the table owner. How can I
> accomplish this?

It looks like you have two choices from what I can find in the manual
after 5 minutes of reading.
1) alter the tables/schema/... to be owned by a role that all of these
users belong to:
http://www.postgresql.org/docs/8.4/interactive/sql-altertable.html

2) grant the table/schema to the role:
http://www.postgresql.org/docs/8.4/interactive/privileges.html

--
Regards,
Richard Broersma Jr.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-09-15 23:02:13 Re: Why is this query running slowly?
Previous Message Guillaume Lelarge 2011-09-15 21:40:48 Re: Remote connection shows localhost databases