Re: Question about "grant create on database" and pg_dump/pg_dumpall

From: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
To: kommi(dot)haribabu(at)gmail(dot)com
Cc: david(dot)g(dot)johnston(at)gmail(dot)com, MURPHYKE(at)email(dot)chop(dot)edu, pgsql-general(at)postgresql(dot)org
Subject: Re: Question about "grant create on database" and pg_dump/pg_dumpall
Date: 2016-09-23 08:13:38
Message-ID: CAOGQiiOgSi4Z-iPUctvTicdj7LXzFE-uaQ7eaGdy0caOE9CQNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jul 5, 2016 at 06:39 AM, Haribabu Kommi
kommi(dot)haribabu(at)gmail(dot)com wrote:

Still i feel the GRANT statements should be present, as the create
database statement
is generated only with -C option. So attached patch produces the GRANT
statements based
on the -x option.

The attached patch does the job fine. However, I am a little skeptical
about this addition, since, it is clearly mentioned in the documentation of
pg_dump that it would not restore global objects, then why expecting this.
Adding this makes pg_dump -C somewhat special as now it is restoring these
grant statements. Only if we consider the popular method of dump-restore
mentioned in the thread (
https://www.postgresql.org/message-id/E1VYMqi-0001P4-P4%40wrigleys.postgresql.org)
with pg_dumpall -g and then individual pg_dump, then it would be helpful to
have this patch.

Browse pgsql-general by date

  From Date Subject
Next Message Rafia Sabih 2016-09-23 11:54:32 "Re: Question about grant create on database and pg_dump/pg_dumpall"
Previous Message Tom Lane 2016-09-22 16:41:21 Re: Unstable C Function