From: | Robert Partyka <bobson(at)ares(dot)fils(dot)us(dot)edu(dot)pl> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_dump file question |
Date: | 2002-10-08 09:57:59 |
Message-ID: | 5.1.0.14.0.20021008115750.009e8c00@ares.fils.us.edu.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
My friend just notice me with some thing that make using dump files harder
to use.
So here we go:
first we make some chaos :)
\c template1 postgres
create user foo with password 'bar' createdb nocreateuser;
\c template1 foo
create database foodb;
\c template1 postgres
alter user foo with nocreatedb;
then we... pg_dumpall -s (nowaday for explain we need only schemas :)
and we try to applay this pg_dumpall file.... and suprise :)
we have something like that:
\connect template1
.....
CREATE USER "foo" WITH SYSID 32 PASSWORD 'bar' NOCREATEDB NOCREATEUSER;
.....
\connect template1 "foo"
CREATE DATABASE "foodb" WITH TEMPLATE = template0 ENCODING = 'LATIN2';
\connect "foodb" "foo"
I think evryone see why it dont work.
I think that rebuild of dumping procedure to detect such a problems and
remake dump file like that
\connect template1
.....
CREATE USER "foo" WITH SYSID 32 PASSWORD 'bar' CREATEDB NOCREATEUSER;
.....
\connect template1 "foo"
CREATE DATABASE "foodb" WITH TEMPLATE = template0 ENCODING = 'LATIN2';
\connect template1 "postgres"
ALTER USER "foo" WITH NOCREATEDB;
\connect "foodb" "foo"
will solve this problem.
regards
Robert Partyka
bobson(at)wdg(dot)pl
www.WDG.pl
From | Date | Subject | |
---|---|---|---|
Next Message | Sir Mordred The Traitor | 2002-10-08 09:58:34 | Little note to php coders |
Previous Message | Zeugswetter Andreas SB SD | 2002-10-08 09:15:41 | Re: Analysis of ganged WAL writes |