From: | "Joe Kramer" <cckramer(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Best practice to grant all privileges on all bjects in database? |
Date: | 2006-05-22 09:59:06 |
Message-ID: | b4c00a110605220259t4cc04adfq8dc56122575f4728@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On a related note, which objects need to be GRANTed specifically?
There is a saying that following objects can have permissions GRANTed:
1. TABLE
2. DATABASE
3. FUNCTION
4. LANGUAGE
5. SCHEMA
6. TABLESPACE
What about SEQUENCE, TRIGGER? PostgreSQL manual has no mention about this.
Thanks.
On 5/20/06, John DeSoi <desoi(at)pgedit(dot)com> wrote:
> You can find some helpful grant scripts here:
>
> http://pgedit.com/tip/postgresql/access_control_functions
>
>
>
>
>
> On 5/19/06, Joe Kramer <cckramer(at)gmail(dot)com> wrote:
> > Hello,
> >
> > I need to grant all privileges on all objects in database. Without
> > using SUPERUSER.
> >
> > It's strange that GRANT ALL PRIVILEGES ON DATABASE is useless, it
> > don't grant privileges on tables.
> >
> > I've found out this "best practice", (more like ugly workaround):
> >
> > select 'grant all on '||schemaname||'.'||tablename||' to
> > \\\"$USER\\\";' from pg_tables where schemaname in ('public');
> > select 'grant all on '||schemaname||'.'||viewname||' to
> > \\\"$USER\\\";' from pg_views where schemaname in ('public');
> >
> > and same for functions,sequences etc.
> >
> >
> > Is there nicer, more friendly way? Maybe there is something like
> > contrib module or procedure that does that in user-friendly way?
> >
> > If not, anyone has a better version of above grant script?
> >
> >
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2006-05-22 10:10:20 | Re: "make check" fails over NFS or tmpfs |
Previous Message | Martijn van Oosterhout | 2006-05-22 09:52:28 | Re: "make check" fails over NFS or tmpfs |