Re: pg_ctl - tighten command parameter checking

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl - tighten command parameter checking
Date: 2002-02-23 21:50:08
Message-ID: 200202232150.g1NLo8m12420@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-02-23 21:51:46 Re: pg_ctl - tighten command parameter checking
Previous Message Bruce Momjian 2002-02-23 21:31:45 Re: pg_ctl - tighten command parameter checking