Re: pgbench tests vs Windows

From: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench tests vs Windows
Date: 2019-07-24 13:08:59
Message-ID: f442e5b0-4753-8339-44e2-b825c0ca4ce2@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 7/24/19 3:56 AM, Fabien COELHO wrote:
>
> Hello Andrew,
>
>> Unfortunately, this isn't portable, as I've just discovered at the cost
>> of quite a bit of time. In particular, you can't assume expr is present
>> and in the path on Windows. The Windows equivalent would be something
>> like:
>>
>>    \setshell two\
>>      @set /a c = 1 + :one  && echo %c%
>
> Hmmm... Can we assume that echo is really always there on Windows? If
> so, the attached patch does something only with "echo".

Yes, it's built into the cmd processor (as is "set /a", to answer Tom's
earlier question about portability - I tested the above back to XP.)

echo is much more universal, and I can confirm that the suggested fix
works on the Windows test box I'm using.

I'll apply and backpatch that. Thanks

cheers

andrew

--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2019-07-24 13:45:04 Re: Support for jsonpath .datetime() method
Previous Message Jehan-Guillaume de Rorthais 2019-07-24 13:03:04 Re: pg_receivewal documentation