Re: [GENERAL] intentional or oversight? pg_dump -c does not restoredefault priviliges on schema public - Mailing list pgsql-general

From Adrian Klaver
Subject Re: [GENERAL] intentional or oversight? pg_dump -c does not restoredefault priviliges on schema public
Date
Msg-id 306a4b5b-4586-14e1-ff82-7ac509e859f1@aklaver.com
Whole thread Raw
In response to Re: [GENERAL] intentional or oversight? pg_dump -c does not restore default priviliges on schema public  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
Responses Re: [GENERAL] intentional or oversight? pg_dump -c does not restore default priviliges on schema public  (Frank van Vugt <ftm.van.vugt@foxi.nl>)
List pgsql-general
On 02/11/2017 01:14 PM, Frank van Vugt wrote:
> Hi Adrian,
>
> Op zaterdag 11 februari 2017 13:02:29 schreef Adrian Klaver:
>> What version of Postgres?
>
> Ah, sorry, missed copying that in:
>
> postgres=# select version();
>                                    version
> ------------------------------------------------------------------------------
>  PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.2, 64-bit
> (1 row)
>
>

I see the same thing now. A diff reveals:

aklaver@tito:~> diff /tmp/publictest95  /tmp/publictest96
5,6c5,6
< -- Dumped from database version 9.5.5
< -- Dumped by pg_dump version 9.5.5
---
 > -- Dumped from database version 9.6.1
 > -- Dumped by pg_dump version 9.6.1
9a10
 > SET idle_in_transaction_session_timeout = 0;
47,56d47
<
<
< --
< -- Name: public; Type: ACL; Schema: -; Owner: postgres
< --
<
< REVOKE ALL ON SCHEMA public FROM PUBLIC;
< REVOKE ALL ON SCHEMA public FROM postgres;
< GRANT ALL ON SCHEMA public TO postgres;
< GRANT ALL ON SCHEMA public TO PUBLIC;

That seems to cause a problem:

aklaver@tito:~> psql -d publictest -U guest
Null display is "NULL".
psql (9.5.5)
Type "help" for help.

publictest=> create table public.public_test(id int);
CREATE TABLE


aklaver@tito:~> /usr/local/pgsql96/bin/psql -d publictest -U guest -p 5442
Null display is "NULL".
psql (9.6.1)
Type "help" for help.

publictest=> create table public.public_test(id int);
ERROR:  permission denied for schema public
LINE 1: create table public.public_test(id int);




--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Custom shuffle function stopped working in 9.6
Next
From: Frank van Vugt
Date:
Subject: Re: [GENERAL] intentional or oversight? pg_dump -c does not restore default priviliges on schema public