Re: Fix vcregress plpython3 warning - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Fix vcregress plpython3 warning
Date
Msg-id ae44b67e-ab76-f2ca-3539-e8427092a623@dunslane.net
Whole thread Raw
In response to Fix vcregress plpython3 warning  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Responses Re: Fix vcregress plpython3 warning
List pgsql-hackers
On 1/7/22 07:20, Juan José Santamaría Flecha wrote:
> Hi,
>
> When running the plcheck in Windows we get the following warning, it
> is visible in the cfbots [1]:
>
> Use of uninitialized value $1 in concatenation (.) or string at
> src/tools/msvc/vcregress.pl <http://vcregress.pl> line 350.
>
> This points to mangle_plpython3 subroutine. The attached patch
> addresses the problem.
>
> [1] http://commitfest.cputube.org/


Yeah, this code is not a model of clarity though. I had to think through
it and I write quite a bit of perl. I would probably write it something
like this:


s/EXTENSION (.*?)plpython2?u/EXTENSION $1plpython3u/g ;


cheers


andrew


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




pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: sqlsmith: ERROR: XX000: bogus varno: 2
Next
From: "Euler Taveira"
Date:
Subject: Re: row filtering for logical replication