From: | Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | intentional or oversight? pg_dump -c does not restore default priviliges on schema public |
Date: | 2017-02-11 20:42:17 |
Message-ID: | 3534542.o3cNaKiDID@techfox |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
L.S.
I noticed the following and wondered whether this is intentional or an
oversight in pg_dump's '-c' option?
The clean option causes the public schema to be dropped and recreated, but
this is done with the default schema priviliges, which are not the same as the
ones assigned during create database:
*** USING PSQL
postgres=# create database publictest;
postgres=# \c publictest;
publictest=# \dn+
List of schemas
Name | Owner | Access privileges | Description
--------+----------+----------------------+------------------------
public | postgres | postgres=UC/postgres+| standard public schema
| | =UC/postgres |
(1 row)
*** USING SHELL
host:~ # pg_dump -c -f /tmp/publictest -h localhost -Fp -U postgres publictest
*** USING PSQL
publictest=# \i /tmp/publictest
publictest=# \dn+
List of schemas
Name | Owner | Access privileges | Description
--------+----------+-------------------+------------------------
public | postgres | | standard public schema
(1 row)
publictest=# grant usage on schema public to public;
GRANT
publictest=# grant create on schema public to public;
GRANT
testje=# \dn+
List of schemas
Name | Owner | Access privileges | Description
--------+----------+----------------------+------------------------
public | postgres | postgres=UC/postgres+| standard public schema
| | =UC/postgres |
(1 row)
--
Best,
Frank.
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2017-02-11 21:02:29 | Re: intentional or oversight? pg_dump -c does not restore default priviliges on schema public |
Previous Message | Pavel Stehule | 2017-02-11 19:04:19 | Re: Custom shuffle function stopped working in 9.6 |