Re: pg_dump and alter database - Mailing list pgsql-general

From Fernando Schapachnik
Subject Re: pg_dump and alter database
Date
Msg-id 20030822172311.GF321@bal740r0.mecon.gov.ar
Whole thread Raw
In response to Re: pg_dump and alter database  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> <btober@seaworthysys.com> writes:
> > I HAVE used pg_dumpall -g to make a backup of of users and groups, but
> > this output does not include the ALTER DATABASE commands.

Another related problem. pg_dump/pg_restore doesn't properly restore GRANT
CREATE ON DATABASE

pg_restore --create db.dump:

--Sample--
[...]

CREATE DATABASE db WITH TEMPLATE = template0 ENCODING = 8;

\connect db pgsql

\connect - dnsadm

--
-- TOC entry 4 (OID 20645)
-- Name: dns; Type: SCHEMA; Schema: -; Owner: dnsadm
-- Data Pos: 0
--

CREATE SCHEMA dns;

--End sample--

Output:

psql template1 -f /tmp/x
CREATE DATABASE
You are now connected to database db as user pgsql.
You are now connected as new user dnsadm.
psql:/tmp/x:13: ERROR:  db: permission denied

Regards.

Fernando.

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: [HACKERS] Buglist
Next
From: Bjørn T Johansen
Date:
Subject: Inserting CR/LF in a select?