Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id ED62A5F9CED for ; Tue, 24 Jul 2012 09:46:14 -0300 (ADT) Received: from mahout.postgresql.org ([98.129.198.123]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SteV9-0001ya-Nj for pgsql-bugs@postgresql.org; Tue, 24 Jul 2012 12:46:14 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SteUv-00054C-EV for pgsql-bugs@postgresql.org; Tue, 24 Jul 2012 12:45:58 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1SteUu-0002ER-Nm for pgsql-bugs@postgresql.org; Tue, 24 Jul 2012 12:45:56 +0000 Date: Tue, 24 Jul 2012 12:45:56 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #6751: usage flaws in pg_restore To: pgsql-bugs@postgresql.org From: pilum.70@uni-muenster.de X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/189 X-Sequence-Number: 33665 The following bug has been logged on the website: Bug reference: 6751 Logged by: Arne Scheffer Email address: pilum.70@uni-muenster.de PostgreSQL version: 9.1.4 Operating system: Unix (RHEL 6) Description: = We've been using PostgreSQL for years now. It's great. Only the usage of pg_restore is annoying (Version 8.3 to 9.1 tested). Please fix the following issues: a.) pg_dump -f sdfsdf.dump sdfsdf pg_restore -d sdfsdf sdfsdf.dump Given Answer: pg_restore: [archiver] input file does not appear to be a valid archive (The User ist shocked. Dump possibly corrupted may be considered.) Better: pg_restore: no archive, plain SQL-File detected, use psql -f instead (or \i from console) b.) pg_restore --create -d sdfsdf sdfsdf.dump (Dump also correctly using sdfsdf as name in the SQL commands as documented) Given answer: Database 'sdfsdf' does not exist. (The User is confused, because therefore --create was used.) Better: Simply make the intended happen. Workaround: Tell the user in the answer how to use template0 as intended. Many newcomers to PostgreSQL will appreciate that fix (and we could shorten our introductions ;-)). At least these issues should be mentioned in the documentation. Thank you in advance Arne Scheffer Abteilung 3 ZIV Muenster University