pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #14724: Unable to revoke CREATE privileges on public schema
4+ messages / 4 participants
[nested] [flat]

* BUG #14724: Unable to revoke CREATE privileges on public schema
@ 2017-06-30 19:18 zam6ak@gmail.com
  2017-06-30 21:14 ` Re: BUG #14724: Unable to revoke CREATE privileges on public schema David G. Johnston <david.g.johnston@gmail.com>
  2017-06-30 21:30 ` Re: BUG #14724: Unable to revoke CREATE privileges on public schema Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: zam6ak@gmail.com @ 2017-06-30 19:18 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      14724
Logged by:          zam6ak
Email address:      zam6ak@gmail.com
PostgreSQL version: 10beta1
Operating system:   Windows Server 2012
Description:        

-- create a test db
CREATE DATABASE test
  WITH OWNER = postgres
       ENCODING = 'UTF8';

-- log in as 'postres' and do:
REVOKE CREATE ON SCHEMA public FROM public;

WARNING:  no privileges could be revoked for "public"


Query returned successfully with no result in 16 msec.



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14724: Unable to revoke CREATE privileges on public schema
  2017-06-30 19:18 BUG #14724: Unable to revoke CREATE privileges on public schema zam6ak@gmail.com
@ 2017-06-30 21:14 ` David G. Johnston <david.g.johnston@gmail.com>
  2017-06-30 21:20   ` Re: BUG #14724: Unable to revoke CREATE privileges on public schema Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  1 sibling, 1 reply; 4+ messages in thread

From: David G. Johnston @ 2017-06-30 21:14 UTC (permalink / raw)
  To: zam6ak@gmail.com; +Cc: pgsql-bugs

On Fri, Jun 30, 2017 at 12:18 PM, <zam6ak@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      14724
> Logged by:          zam6ak
> Email address:      zam6ak@gmail.com
> PostgreSQL version: 10beta1
> Operating system:   Windows Server 2012
> Description:
>
> -- create a test db
> CREATE DATABASE test
>   WITH OWNER = postgres
>        ENCODING = 'UTF8';
>
> -- log in as 'postres' and do:
> REVOKE CREATE ON SCHEMA public FROM public;
>
> WARNING:  no privileges could be revoked for "public"
>
>
> Query returned successfully with no result in 16 msec.
>

https://www.postgresql.org/docs/9.6/static/sql-grant.html.

"No privileges are granted to PUBLIC by default on tables, columns, schemas
or tablespaces."

You've been correctly warned that you've attempted to revoke a privilege
that doesn't exist.

David J.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14724: Unable to revoke CREATE privileges on public schema
  2017-06-30 19:18 BUG #14724: Unable to revoke CREATE privileges on public schema zam6ak@gmail.com
  2017-06-30 21:14 ` Re: BUG #14724: Unable to revoke CREATE privileges on public schema David G. Johnston <david.g.johnston@gmail.com>
@ 2017-06-30 21:20   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Eisentraut @ 2017-06-30 21:20 UTC (permalink / raw)
  To: David G. Johnston <david.g.johnston@gmail.com>; zam6ak@gmail.com; +Cc: pgsql-bugs

On 6/30/17 17:14, David G. Johnston wrote:
>     -- create a test db
>     CREATE DATABASE test
>       WITH OWNER = postgres
>            ENCODING = 'UTF8';
> 
>     -- log in as 'postres' and do:
>     REVOKE CREATE ON SCHEMA public FROM public;
> 
>     WARNING:  no privileges could be revoked for "public"
> 
> 
>     Query returned successfully with no result in 16 msec.
> 
> 
> https://www.postgresql.org/docs/9.6/static/sql-grant.html.
> 
> "No privileges are granted to PUBLIC by default on tables, columns,
> schemas or tablespaces."
> 
> You've been correctly warned that you've attempted to revoke a privilege
> that doesn't exist.

The "public" schema does by default have privileges, and the above
commands do work for me.  Maybe there is some silly stuff going on in
the template databases.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #14724: Unable to revoke CREATE privileges on public schema
  2017-06-30 19:18 BUG #14724: Unable to revoke CREATE privileges on public schema zam6ak@gmail.com
@ 2017-06-30 21:30 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2017-06-30 21:30 UTC (permalink / raw)
  To: zam6ak@gmail.com; +Cc: pgsql-bugs

zam6ak@gmail.com writes:
> -- create a test db
> CREATE DATABASE test
>   WITH OWNER = postgres
>        ENCODING = 'UTF8';

> -- log in as 'postres' and do:
> REVOKE CREATE ON SCHEMA public FROM public;
> WARNING:  no privileges could be revoked for "public"

Works for me.  Maybe your "postgres" isn't a superuser?
I can duplicate the above if I try it with a non-superuser
database owner.  (And no, that is not a bug, it's just
how it works.  Being owner of a DB doesn't in itself give
you ownership of contained objects.)

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-06-30 21:30 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 19:18 BUG #14724: Unable to revoke CREATE privileges on public schema zam6ak@gmail.com
2017-06-30 21:14 ` David G. Johnston <david.g.johnston@gmail.com>
2017-06-30 21:20   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2017-06-30 21:30 ` Tom Lane <tgl@sss.pgh.pa.us>

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