Re: pg_ctl - tighten command parameter checking - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_ctl - tighten command parameter checking
Date
Msg-id 200202232150.g1NLo8m12420@candle.pha.pa.us
Whole thread Raw
In response to Re: pg_ctl - tighten command parameter checking  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-hackers
Oliver Elphick wrote:
> On Sat, 2002-02-23 at 21:31, Bruce Momjian wrote:
> > 
> > Oliver, I am going to reject this.  We give them the syntax for the
> > params.  I don't see a need to check for leading dash to see if they
> > forgot a param.  I would like to see a more general solution that uses
> > getopt or something more robust, but moving all that checking to each
> > param just seems like a waste.
> 
> I would certainly prefer to use getopt, but is that portable?  Peter
> wants me to use case..esac instead of cut; I would have thought getopt
> was a lot less portable.

No, it isn't. The problem is we don't have a portable solution _and_ we
don't want to throw checks all over the place.  I realize this is a
non-solution, but I guess I don't consider is a big problem.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: pg_ctl - tighten command parameter checking
Next
From: Bruce Momjian
Date:
Subject: Re: pg_ctl - tighten command parameter checking