pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: sekhar chandra <sekharclouddbengineer@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Fwd: not able to give usage access to public schema
Date: Sat, 13 Jun 2020 10:58:59 -0700
Message-ID: <46c038b7-034c-261b-1780-280306558dae@aklaver.com> (raw)
In-Reply-To: <CAB7a7NbTVESHYw9urwDk0pnzms=wJUcR-0uCWCO0NCd+gAkBTA@mail.gmail.com>
References: <CAB7a7NamePJDb2EXp+WogHxw3GoVFN62TsbnnYP9tYZrHgmYgg@mail.gmail.com>
	<CAB7a7NaYcD9U+uWrMni7zstsQJSf2e9KKcyp5pzHSwuz4BbtMw@mail.gmail.com>
	<cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com>
	<CAB7a7NbTVESHYw9urwDk0pnzms=wJUcR-0uCWCO0NCd+gAkBTA@mail.gmail.com>

On 6/13/20 10:33 AM, sekhar chandra wrote:
> Adrian - when I follow the same steps what you did . in my case , the 
> result is false.
> 
> 
> grant usage on schema public to role_test ;
> GRANT
> 
> SELECT rolname, has_schema_privilege('role_test', 'public', 'usage')
> from pg_roles where rolname = 'role_test';
>     rolname  | has_schema_privilege
> -----------+----------------------
>    role_test | f
> 

Might be a good time to point out :) :

https://www.postgresql.org/docs/12/ddl-schemas.html#DDL-SCHEMAS-PUBLIC

" Note that by default, everyone has CREATE and USAGE privileges on the 
schema public. This allows all users that are able to connect to a given 
database to create objects in its public schema. "


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (7+ messages)  latest in thread

Message-ID: <46c038b7-034c-261b-1780-280306558dae@aklaver.com>
Permalink:  ../46c038b7-034c-261b-1780-280306558dae@aklaver.com/
Also on:    postgresql.org/message-id/46c038b7-034c-261b-1780-280306558dae@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, sekharclouddbengineer@gmail.com
  Subject: Re: Fwd: not able to give usage access to public schema
  In-Reply-To: <46c038b7-034c-261b-1780-280306558dae@aklaver.com>
  References: <CAB7a7NamePJDb2EXp+WogHxw3GoVFN62TsbnnYP9tYZrHgmYgg@mail.gmail.com> <CAB7a7NaYcD9U+uWrMni7zstsQJSf2e9KKcyp5pzHSwuz4BbtMw@mail.gmail.com> <cd84bab4-0cc3-9c0a-64cf-e23cc6cf62a6@aklaver.com> <CAB7a7NbTVESHYw9urwDk0pnzms=wJUcR-0uCWCO0NCd+gAkBTA@mail.gmail.com> <46c038b7-034c-261b-1780-280306558dae@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox