Re: pg_dump schema in pg11 without global permissions - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_dump schema in pg11 without global permissions
Date
Msg-id 2739.1563924267@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump schema in pg11 without global permissions  (Sergey Koposov <skoposov@cmu.edu>)
Responses Re: pg_dump schema in pg11 without global permissions
List pgsql-general
[ hey guys, please trim your replies ]

Sergey Koposov <skoposov@cmu.edu> writes:
> On Tue, 2019-07-23 at 16:04 -0700, Adrian Klaver wrote:
>> That is only supposed to happen if you use -C(--create) and I am seeing 
>> that in your examples.

> For some reason I see when I just have 
> a command  like this it doesnt' have a grant connect on database
> ~/soft/pgsql_install/bin/pg_dump -U skoposov -h localhost -n xx  --no-tablespaces test1
> but when I add  '-Fc' flag to pg_dump, I can see 'grant connect' inside the output (interdispersed with binary stuff)

The GRANT CONNECT will be in the archive, but pg_restore should only
print it if you specified -C.

Experimenting, however, I see that that only works as intended if
I use v11 pg_restore.  I can replicate your result if I use v10
pg_restore.  So ... don't do that.

            regards, tom lane



pgsql-general by date:

Previous
From: Sergey Koposov
Date:
Subject: Re: pg_dump schema in pg11 without global permissions
Next
From: Sergey Koposov
Date:
Subject: Re: pg_dump schema in pg11 without global permissions