Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 750661337B97 for ; Thu, 5 May 2011 10:35:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 55831-07 for ; Thu, 5 May 2011 13:35:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by mail.postgresql.org (Postfix) with ESMTP id 246B81337B93 for ; Thu, 5 May 2011 10:35:30 -0300 (ADT) Received: from wwwmaster.postgresql.org (wwwmaster.postgresql.org [217.196.146.204]) by wwwmaster.postgresql.org (8.14.3/8.14.3) with ESMTP id p45DZU2v006514 for ; Thu, 5 May 2011 13:35:30 GMT (envelope-from www@wwwmaster.postgresql.org) Received: (from www@localhost) by wwwmaster.postgresql.org (8.14.3/8.14.3/Submit) id p45DZUIe006513; Thu, 5 May 2011 13:35:30 GMT (envelope-from www) Date: Thu, 5 May 2011 13:35:30 GMT Message-Id: <201105051335.p45DZUIe006513@wwwmaster.postgresql.org> To: pgsql-bugs@postgresql.org Subject: BUG #6007: pg_restore -C -d does not behave as expected when dump is done with pg_dump From: "gab" Content-Type: text/plain; charset=utf-8 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 201105/22 X-Sequence-Number: 30161 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 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 ...