BUG #6007: pg_restore -C -d does not behave as expected when dump is done with pg_dump

Поиск
Список
Период
Сортировка
От gab
Тема BUG #6007: pg_restore -C -d does not behave as expected when dump is done with pg_dump
Дата
Msg-id 201105051335.p45DZUIe006513@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #6007: pg_restore -C -d does not behave as expected when dump is done with pg_dump
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      6007
Logged by:          gab
Email address:      korsani@free.fr
PostgreSQL version: 8.4.8
Operating system:   FreeBSD
Description:        pg_restore -C -d <database> does not behave as expected
when dump is done with pg_dump
Details:

Create a database name 'test' and fill it :
CREATE TABLE t (
    t text
);


ALTER TABLE public.t OWNER TO postgres;

--
-- Data for Name: t; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY t (t) FROM stdin;
plop
\.

Then dump it :
pg_dump -F c -f /tmp/plop test

Drop it :
psql -c 'drop database test;'

Try to restore it using :
pg_restore -C -d test /tmp/plop
pg_restore: [archiver (db)] connection to database "test" failed: FATAL:
database "test" does not exist

But the doc says that -C use the parameter of -d to CREATE the database ...

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: BUG #6006: Will not install
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #6007: pg_restore -C -d does not behave as expected when dump is done with pg_dump