Re: [GENERAL] grant select on pg_stat_activity

2016-03-21 Thread Adrian Klaver
On 03/21/2016 07:15 AM, Vick Khera wrote: On Fri, Mar 18, 2016 at 5:46 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: They should be able to, see below. If that is not your case, then more information is needed. You can see your own queries, however non-superuser will not

Re: [GENERAL] grant select on pg_stat_activity

2016-03-21 Thread Vick Khera
On Fri, Mar 18, 2016 at 5:46 PM, Adrian Klaver wrote: > They should be able to, see below. If that is not your case, then more > information is needed. > You can see your own queries, however non-superuser will not see the query for other users. You will be able to see the other info, though. I

Re: [GENERAL] grant select on pg_stat_activity

2016-03-19 Thread Adrian Klaver
On 03/18/2016 01:09 PM, avi Singh wrote: Guys Whats the best way to grant select on pg_stat_activity so that non super user can access this view. They should be able to, see below. If that is not your case, then more information is needed. guest@test=> select current_user; current_

[GENERAL] grant select on pg_stat_activity

2016-03-19 Thread avi Singh
Guys Whats the best way to grant select on pg_stat_activity so that non super user can access this view. Thanks Avi

Re: [GENERAL] Grant SELECT/Execute to View/Function but not underlying Table

2015-09-24 Thread David G. Johnston
On Thursday, September 24, 2015, Maxim Boguk wrote: > > > On Thu, Sep 24, 2015 at 9:28 PM, Alex Magnum > wrote: > >> Hi, >> is it possible to grant select to views and functions without the need to >> also grant the user the SELECT privileges to the Tables used in the views >> or functions? >> >

Re: [GENERAL] Grant SELECT/Execute to View/Function but not underlying Table

2015-09-24 Thread Thom Brown
On 24 September 2015 at 12:28, Alex Magnum wrote: > Hi, > is it possible to grant select to views and functions without the need to > also grant the user the SELECT privileges to the Tables used in the views or > functions? > > That way I could create read only users on a website and limit their a

Re: [GENERAL] Grant SELECT/Execute to View/Function but not underlying Table

2015-09-24 Thread David G. Johnston
On Thursday, September 24, 2015, Alex Magnum wrote: > Hi, > is it possible to grant select to views and functions without the need to > also grant the user the SELECT privileges to the Tables used in the views > or functions? > > That way I could create read only users on a website and limit thei

Re: [GENERAL] Grant SELECT/Execute to View/Function but not underlying Table

2015-09-24 Thread Maxim Boguk
On Thu, Sep 24, 2015 at 9:28 PM, Alex Magnum wrote: > Hi, > is it possible to grant select to views and functions without the need to > also grant the user the SELECT privileges to the Tables used in the views > or functions? > > That way I could create read only users on a website and limit thei

[GENERAL] Grant SELECT/Execute to View/Function but not underlying Table

2015-09-24 Thread Alex Magnum
Hi, is it possible to grant select to views and functions without the need to also grant the user the SELECT privileges to the Tables used in the views or functions? That way I could create read only users on a website and limit their access to the bare minimum. Thanks in advance for any advise o

Re: [GENERAL] GRANT SELECT

2012-09-02 Thread Jasen Betts
On 2012-08-27, Stephen Crawford wrote: > Is there a simple way to grant SELECT privileges to a user for all the > tables in a database, without having to do it for each table? grant the role (membership of) a role that already has the priveleges. -- ⚂⚃ 100% natural -- Sent via pgsql-gener

Re: [GENERAL] GRANT SELECT

2012-08-27 Thread Pavel Stehule
2012/8/27 Stephen Crawford : > I see that works for 9, but I'm still in 8.4. But another person just sent > me a bit of code to do it: > just don't use "format" function execure 'grant select on ' || tn || 'to '; > > do $$ > declare tn text; > begin > for tn in select c.oid::regclass::text

Re: [GENERAL] GRANT SELECT

2012-08-27 Thread Stephen Crawford
I see that works for 9, but I'm still in 8.4. But another person just sent me a bit of code to do it: do $$ declare tn text; begin for tn in select c.oid::regclass::text from pg_class c join pg_namespace n on n.oid = c.relnamespace where n.nspname not in ('pg_catalog',

Re: [GENERAL] GRANT SELECT

2012-08-27 Thread ElEucas
*GRANT *{ { SELECT | INSERT | UPDATE | DELETE | TRUNCATE | REFERENCES | TRIGGER } [, ...] | ALL [ PRIVILEGES ] } ON { [ TABLE ] table_name [, ...] | *ALL TABLES IN SCHEMA schema_name *[, ...] } TO { [ GROUP ] role_name | PUBLIC } [, ...] [ WITH GRANT OPTION ] See more on http

[GENERAL] GRANT SELECT

2012-08-27 Thread Stephen Crawford
Is there a simple way to grant SELECT privileges to a user for all the tables in a database, without having to do it for each table? Thanks, Steve -- Stephen Crawford Center for Environmental Informatics The Pennsylvania State University -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Tomi N/A
2006/12/13, Tom Lane <[EMAIL PROTECTED]>: Martijn van Oosterhout writes: > I don't beleive you have to explicitly grant access to the database, or > the schema, but you definitly have to grant access to the tables > directly. They're completely separate privileges. GRANT ON DATABASE grants or

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Gene
That would indeed be a handy feature... I was surprised when I discovered this was not available like in mysql, it's a real pain to grant permissions to a bunch of tables without querying table metadata. GRANT ALL ON TABLE *.* TO joeblow which would indeed be a useful thing to have, bu

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Tom Lane
Martijn van Oosterhout writes: > I don't beleive you have to explicitly grant access to the database, or > the schema, but you definitly have to grant access to the tables > directly. They're completely separate privileges. GRANT ON DATABASE grants or revokes permissions associated with database

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Martijn van Oosterhout
On Wed, Dec 13, 2006 at 01:42:32PM +, Tomi N/A wrote: > I don't get it. I grant all privileges on a database to a role, but > the server won't let it access the schemas. I grant all privileges on > the schema to the same role, but the server won't let it access the > relations in the schema. >

Re: [GENERAL] grant select on all tables of schema or database

2006-12-13 Thread Tomi N/A
2006/9/28, Najib Abi Fadel <[EMAIL PROTECTED]>: when u connect to the database type: \h GRANT and you will get all the Grant options: GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] } ON DATABASE dbname [, ...] TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH G

Re: [GENERAL] grant select on all tables of schema or database

2006-09-27 Thread Najib Abi Fadel
when u connect to the database type:\h GRANTand you will get all the Grant options:GRANT { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }    ON DATABASE dbname [, ...]    TO { username | GROUP groupname | PUBLIC } [, ...] [ WITH GRANT OPTION ]This will grant the privileges  on all tabl

[GENERAL] grant select on all tables of schema or database

2006-09-27 Thread Gene
It seems like it should be a very easy problem to solve I just need one role to have select privileges on all the tables of a particular schema or database including any new tables that are created since they are created programmatically daily. I've combed google and the docs to no avail. Do I need

Re: [GENERAL] Grant Select privileges for all tables in schema

2004-07-07 Thread Bruno Wolff III
On Tue, Jul 06, 2004 at 15:44:01 -0700, [EMAIL PROTECTED] wrote: > Hi there, > > I am using Postgresql 7.3 and I want to grant select rights to a user on all tables > in a schema, including those that may be created in the future but whose names are > not yet known. I want to do something lik