Обсуждение: BUG #6751: usage flaws in pg_restore

Поиск
Список
Период
Сортировка

BUG #6751: usage flaws in pg_restore

От
pilum.70@uni-muenster.de
Дата:
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:=20=20=20=20=20=20=20=20

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

Re: BUG #6751: usage flaws in pg_restore

От
Craig Ringer
Дата:
On 07/24/2012 08:45 PM, pilum.70@uni-muenster.de wrote:
> 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
Yeah. pg_restore really needs some usability love.  I posted a big rant
about it a while ago. It's all about finding the time to actually do
something about it.

--
Craig Ringer

Re: BUG #6751: usage flaws in pg_restore

От
Marti Raudsepp
Дата:
On Tue, Jul 24, 2012 at 3:45 PM,  <pilum.70@uni-muenster.de> wrote:
> 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).

> Given Answer:
>  pg_restore: [archiver] input file does not appear to be a valid archive

This has already been fixed. PostgreSQL 9.2beta says:
pg_restore: [archiver] input file appears to be a text format dump.
Please use psql.

Regards,
Marti