Re: pgsql: Follow-up fixes for "Make all Perl warnings fatal"

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Follow-up fixes for "Make all Perl warnings fatal"
Date: 2024-01-02 14:49:37
Message-ID: b936521f-a79e-4ddd-d9a4-1864212d7bb1@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers


On 2023-12-29 Fr 17:56, Peter Eisentraut wrote:
> Follow-up fixes for "Make all Perl warnings fatal"
>
> Mostly, we need to check whether $ENV{PG_TEST_EXTRA} is set before
> doing regular expression matches against it.

This reads a bit oddly to me.

-elsif ($ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)
+elsif (!$ENV{PG_TEST_EXTRA} || $ENV{PG_TEST_EXTRA} !~ /\bkerberos\b/)

I think I would have changed it like this

  elsif (($ENV{PG_TEST_EXTRA" || "") !~ /\bkerberos\b/)

which is an idiom we've used elsewhere.

Still, TIMTOWTDI.

cheers

andrew (japh)

--

Andrew Dunstan
EDB: https://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2024-01-02 15:32:34 pgsql: Add WALSummarizerLock to wait_event_names.txt
Previous Message Peter Eisentraut 2024-01-02 09:22:04 pgsql: Fix typos in simplehash.h