Re: proposal: pg_restore --convert-to-text

2019-07-03 Thread Daniel Verite
Alvaro Herrera wrote: > So you suggest that it should be > > pg_restore: error: one of -d/--dbname, -f/--file and -l/--list must be > specified > ? I'd suggest this minimal fix : (int argc, char **argv) /* Complain if neither -f nor -d was specified (except if dumping TOC) */

Re: proposal: pg_restore --convert-to-text

2019-06-12 Thread Alvaro Herrera
On 2019-Jun-12, Daniel Verite wrote: > While testing pg_restore on v12, I'm stumbling on this too. Thanks for testing. > 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

Re: proposal: pg_restore --convert-to-text

2019-06-12 Thread Andrew Gierth
> "Daniel" == Daniel Verite writes: Daniel> While testing pg_restore on v12, I'm stumbling on this too. Daniel> pg_restore without argument fails like that: Daniel> $ pg_restore Daniel> pg_restore: error: one of -d/--dbname and -f/--file must be specified Yeah, that's not good. How

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

2019-06-12 Thread Daniel Verite
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 > >

Re: proposal: pg_restore --convert-to-text

2019-04-04 Thread Alvaro Herrera
I just pushed it with trivial changes: * rebased for cc8d41511721 * changed wording in the error message * added a new test for the condition in t/001_basic.pl * Added the "-" in the --help line of -f. Andrew G. never confirmed that this change is sufficient to appease users being confused

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

2019-03-17 Thread Imai, Yoshikazu
On Fri, Mar 15, 2019 at 6:20 AM, Imai, Yoshikazu wrote: > Upon committing this, we have to care this patch break backwards > compatibility, but I haven't seen any complaints so far. If there are > no objections, I will set this patch to ready for committer. Jose had set this to ready for

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

2019-03-17 Thread Imai, Yoshikazu
On Sat, Mar 16, 2019 at 10:55 PM, Euler Taveira 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.) > > > I

Re: proposal: pg_restore --convert-to-text

2019-03-17 Thread José Arthur Benetasso Villanova
On Sat, 16 Mar 2019, Euler Taveira wrote: I think the former one looks like pretty, but which one is preffered? I don't have a style preference but decided to change to your suggestion. New version attached. Again, the patch compiles and works as expected. -- José Arthur Benetasso

Re: proposal: pg_restore --convert-to-text

2019-03-16 Thread Euler Taveira
Em qua, 27 de fev de 2019 às 23:48, Imai, Yoshikazu escreveu: > > 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.) > I

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

2019-03-15 Thread Imai, Yoshikazu
Hi Jose, Sorry for my late reply. On Wed, Mar 6, 2019 at 10:58 AM, 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

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

2019-03-06 Thread José Arthur Benetasso Villanova
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

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

2019-02-27 Thread Imai, Yoshikazu
Hi, On Tue, Feb 19, 2019 at 8:20 PM, Euler Taveira wrote: > Em seg, 18 de fev de 2019 às 19:21, Tom Lane escreveu: > > > > Euler Taveira writes: > > > Since no one has stepped up, I took a stab at it. It will prohibit > > > standard output unless '-f -' be specified. -l option also has the > >

Re: proposal: pg_restore --convert-to-text

2019-02-19 Thread Euler Taveira
Em seg, 18 de fev de 2019 às 19:21, Tom Lane escreveu: > > Euler Taveira writes: > > Since no one has stepped up, I took a stab at it. It will prohibit > > standard output unless '-f -' be specified. -l option also has the > > same restriction. > > Hm, don't really see the need to break -l usage

Re: proposal: pg_restore --convert-to-text

2019-02-18 Thread Tom Lane
Euler Taveira writes: > Since no one has stepped up, I took a stab at it. It will prohibit > standard output unless '-f -' be specified. -l option also has the > same restriction. Hm, don't really see the need to break -l usage here. Pls add to next CF, if you didn't already.

Re: proposal: pg_restore --convert-to-text

2019-02-18 Thread Euler Taveira
Em qui, 14 de fev de 2019 às 22:41, Andreas Karlsson escreveu: > Agreed, "-f -" would be acceptable. I use pg_restore to stdout a lot, > but almost always manually and would have to have to remember and type > "--convert-to-text". > Since no one has stepped up, I took a stab at it. It will

Re: proposal: pg_restore --convert-to-text

2019-02-14 Thread Andreas Karlsson
On 14/02/2019 01.31, Euler Taveira wrote: Em qua, 13 de fev de 2019 às 19:56, Andrew Gierth escreveu: I propose we add a new option: --convert-to-text or some such name, and then make pg_restore throw a usage error if neither -d nor the new option is given. However, I agree that pg_restore

Re: proposal: pg_restore --convert-to-text

2019-02-13 Thread Tom Lane
Euler Taveira writes: > Em qua, 13 de fev de 2019 às 19:56, Andrew Gierth > escreveu: >> I propose we add a new option: --convert-to-text or some such name, and >> then make pg_restore throw a usage error if neither -d nor the new >> option is given. > However, I agree that pg_restore to stdout

Re: proposal: pg_restore --convert-to-text

2019-02-13 Thread Euler Taveira
Em qua, 13 de fev de 2019 às 19:56, Andrew Gierth escreveu: > One of the remarkably common user errors with pg_restore is users > leaving off the -d option. (We get cases of it regularly on the IRC > channel, including one just now which prompted me to finally propose > this) > I'm not sure it is

proposal: pg_restore --convert-to-text

2019-02-13 Thread Andrew Gierth
One of the remarkably common user errors with pg_restore is users leaving off the -d option. (We get cases of it regularly on the IRC channel, including one just now which prompted me to finally propose this) I propose we add a new option: --convert-to-text or some such name, and then make