RE: proposal: pg_restore --convert-to-text

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: "José Arthur Benetasso Villanova" <jose(dot)arthur(at)gmail(dot)com>
Cc: "Imai, Yoshikazu" <imai(dot)yoshikazu(at)jp(dot)fujitsu(dot)com>,"Euler Taveira" <euler(at)timbira(dot)com(dot)br>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Andreas Karlsson" <andreas(at)proxel(dot)se>,"Andrew Gierth" <andrew(at)tao11(dot)riddles(dot)org(dot)uk>,"pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: proposal: pg_restore --convert-to-text
Date: 2019-06-12 15:20:59
Message-ID: 4c5d3ac3-36bc-45b2-85cc-c8e0b1404023@manitou-mail.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

José Arthur Benetasso Villanova wrote:

> On Thu, 28 Feb 2019, Imai, Yoshikazu wrote:
>
> > Is there no need to rewrite the Description in the Doc to state we should specify either -d or -f option?
> > (and also it might be better to write if -l option is given, neither -d nor -f option isn't necessarily needed.)
>
> Since the default part of text was removed, looks ok to me.

[4 months later]

While testing pg_restore on v12, I'm stumbling on this too.
pg_restore without argument fails like that:

$ pg_restore
pg_restore: error: one of -d/--dbname and -f/--file must be specified

But that's not right since "pg_restore -l dumpfile" would work.
I don't understand why the discussion seems to conclude that it's okay.

Also, in the doc at https://www.postgresql.org/docs/devel/app-pgrestore.html
the synopsis is

pg_restore [connection-option...] [option...] [filename]

so the invocation without argument seems possible while in fact
it's not.

On a subjective note, I must say that I don't find the change to be
helpful.
In particular saying that --file must be specified leaves me with
no idea what file it's talking about: the dumpfile or the output file?
My first inclination is to transform "pg_restore dumpfile" into
"pg_restore -f dumpfile", which does nothing but wait
(it waits for the dumpfile on the standard input, before
I realize that it's not working and hit ^C. Fortunately it doesn't
overwrite the dumpfile with an empty output).

So the change in v12 removes the standard output as default,
but does not remove the standard input as default.
Isn't that weird?

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Siarhei Siniak 2019-06-12 15:24:35 Re: GiST limits on contrib/cube with dimension > 100?
Previous Message Andrey Borodin 2019-06-12 15:14:34 Re: GiST limits on contrib/cube with dimension > 100?