pg_dump file question
От | Robert Partyka |
---|---|
Тема | pg_dump file question |
Дата | |
Msg-id | 5.1.0.14.0.20021008115750.009e8c00@ares.fils.us.edu.pl обсуждение исходный текст |
Ответы |
Re: pg_dump file question
|
Список | 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@wdg.pl www.WDG.pl
В списке pgsql-hackers по дате отправления: