Re: mb_regress.sh gripes

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mb_regress.sh gripes
Date: 2011-09-02 22:05:02
Message-ID: CAK3UJRF1T6prMRuaBC69R+w0eS0WjkrOx29Vrg6vxyGxUN14KQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 1, 2011 at 9:25 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Committed, with some changes.  I used the new --if-exists option for
> dropdb rather than doing it as you had it here; I assume this may have
> been the motivation for that patch.

Thanks, and that was indeed one reason I wanted dropdb --if-exists.

> I also just made the exit code 1
> no matter how many failures there were.  That seems more normal, and I
> wasn't altogether certain that $((expr)) is completely portable.

Yeah, I wasn't sure about that either. The old book "The Unix
Programming Environment" (section "Arithmetic in sh") claims that
using expr or bc is the only way to do such arithmetic, e.g.:
var=`expr $var + 1`

But then [1] documents arithmetic expansion as used in the patch. But
anyway, just returning 1 as you've done seems fine.

Josh

[1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_04

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2011-09-02 22:37:17 Re: pg_upgrade automatic testing
Previous Message Josh Berkus 2011-09-02 21:54:53 Re: CF2011-09