Re: pg_ctl - tighten command parameter checking

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_ctl - tighten command parameter checking
Date: 2002-02-23 02:33:27
Message-ID: 200202230233.g1N2XRw05783@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Need to use case before patch application.

---------------------------------------------------------------------------

Peter Eisentraut wrote:
> Oliver Elphick writes:
>
> > The attached patch improves the command parameter checking of pg_ctl.
> >
> > At present, there is nothing to check that the parameter given with a
> > parameter-taking option is actually valid. For example, -l can be given
> > without a following logfile name; on a strict POSIX shell such as ash,
> > you will get a subsequent failure because of too many shifts, but bash
> > will let it pass without showing any error. The patch checks that each
> > parameter is not empty and is not another option.
>
> Isn't this problem present in all of our scripts?
>
> Btw., you shouldn't use "cut" in portable scripts. You could probably use
> "case" to do the matching you want.
>
> --
> Peter Eisentraut peter_e(at)gmx(dot)net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
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 02:36:56 Re: pg_dump: use ALTER TABLE for PKs
Previous Message Bruce Momjian 2002-02-23 02:32:33 Re: pg_ctl - tighten command parameter checking