Re: use Getopt::Long for catalog scripts

2019-02-12 Thread John Naylor
On 2/12/19, Alvaro Herrera wrote: > Pushed, thanks. Thank you. -- John Naylorhttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: use Getopt::Long for catalog scripts

2019-02-12 Thread Alvaro Herrera
On 2019-Feb-12, Alvaro Herrera wrote: > On 2019-Feb-08, John Naylor wrote: > > > On Thu, Feb 7, 2019 at 6:53 PM David Fetter wrote: > > > [some style suggestions] > > > > I've included these in v2, and also some additional tweaks for consistency. > > I noticed that because we have this line

Re: use Getopt::Long for catalog scripts

2019-02-12 Thread Alvaro Herrera
On 2019-Feb-08, John Naylor wrote: > On Thu, Feb 7, 2019 at 6:53 PM David Fetter wrote: > > [some style suggestions] > > I've included these in v2, and also some additional tweaks for consistency. I noticed that because we have this line in the scripts, BEGIN { use lib

Re: use Getopt::Long for catalog scripts

2019-02-07 Thread John Naylor
es From 0bf2b3ffdaa16d85856074dda8e15c09fc99d0fe Mon Sep 17 00:00:00 2001 From: John Naylor Date: Thu, 7 Feb 2019 20:10:50 +0100 Subject: [PATCH v2] Use Getopt::Long for catalog scripts Replace hand-rolled option parsing with the Getopt module. This is shorter and easier to read. In passing, make some c

Re: use Getopt::Long for catalog scripts

2019-02-07 Thread Alvaro Herrera
Why is this script talking to me? On 2019-Feb-07, David Fetter wrote: > Similarly, > > die "-I, the header include path, must be specified.\n" unless $include_path; But why must thee, oh mighty header include path, be specified? -- Álvaro Herrerahttps://www.2ndQuadrant.com/

Re: use Getopt::Long for catalog scripts

2019-02-07 Thread David Fetter
On Thu, Feb 07, 2019 at 10:09:08AM +0100, John Naylor wrote: > This was suggested in > > https://www.postgresql.org/message-id/11766.1545942853%40sss.pgh.pa.us > > I also adjusted usage() to match. There might be other scripts that > could use this treatment, but I figure this is a good start. >

use Getopt::Long for catalog scripts

2019-02-07 Thread John Naylor
This was suggested in https://www.postgresql.org/message-id/11766.1545942853%40sss.pgh.pa.us I also adjusted usage() to match. There might be other scripts that could use this treatment, but I figure this is a good start. -- John Naylorhttps://www.2ndQuadrant.com/ PostgreSQL