Thread: Fix vcregress plpython3 warning
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 line 350.
This points to mangle_plpython3 subroutine. The attached patch addresses the problem.
Regards,
Juan José Santamaría Flecha
Attachment
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
On Fri, Jan 7, 2022 at 2:30 PM Andrew Dunstan <andrew@dunslane.net> wrote:
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 ;
Yeah, I had to do some testing to figure it out. Based on what regress-python3-mangle.mk does, I think it tries to ignore cases such as:
DROP EXTENSION IF EXISTS plpython2u CASCADE;
Which that expression would match. Maybe use a couple of lines as in the make file?
s/EXTENSION plpython2?u/EXTENSION plpython3u/g
s/EXTENSION ([^ ]*)_plpython2?u/EXTENSION \$1_plpython3u/g
s/EXTENSION ([^ ]*)_plpython2?u/EXTENSION \$1_plpython3u/g
Regards,
Juan José Santamaría Flecha
On Fri, Jan 7, 2022 at 2:56 PM Juan José Santamaría Flecha <juanjo.santamaria@gmail.com> wrote:
copy-paste
s/EXTENSION plpython2?u/EXTENSION plpython3u/gs/EXTENSION ([^ ]*)_plpython2?u/EXTENSION $1_plpython3u/g
On 1/7/22 08:56, Juan José Santamaría Flecha wrote: > > On Fri, Jan 7, 2022 at 2:30 PM Andrew Dunstan <andrew@dunslane.net> wrote: > > > 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 ; > > Yeah, I had to do some testing to figure it out. Based on > what regress-python3-mangle.mk <http://regress-python3-mangle.mk> > does, I think it tries to ignore cases such as: > > DROP EXTENSION IF EXISTS plpython2u CASCADE; > > Which that expression would match. Maybe use a couple of lines as in > the make file? > > s/EXTENSION plpython2?u/EXTENSION plpython3u/g > s/EXTENSION ([^ ]*)_plpython2?u/EXTENSION \$1_plpython3u/g > > In that case, just this should work: s/EXTENSION (\S*?)plpython2?u/EXTENSION $1plpython3u/g ; cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
On Fri, Jan 7, 2022 at 3:24 PM Andrew Dunstan <andrew@dunslane.net> wrote:
In that case, just this should work:
s/EXTENSION (\S*?)plpython2?u/EXTENSION $1plpython3u/g ;
LGTM.
Regards,
Juan José Santamaría Flecha
On Fri, Jan 7, 2022 at 3:24 PM Andrew Dunstan <andrew@dunslane.net> wrote:
In that case, just this should work:
s/EXTENSION (\S*?)plpython2?u/EXTENSION $1plpython3u/g ;
Please find attached a patch for so. I have also open an item in the commitfest:
Regards,
Juan José Santamaría Flecha
On Mon, Jan 10, 2022 at 12:51 PM Juan José Santamaría Flecha <juanjo.santamaria@gmail.com> wrote:
Please find attached a patch for so.
The patch.
Regards,Juan José Santamaría Flecha
Attachment
On 1/10/22 06:53, Juan José Santamaría Flecha wrote: > > On Mon, Jan 10, 2022 at 12:51 PM Juan José Santamaría Flecha > <juanjo.santamaria@gmail.com> wrote: > > Please find attached a patch for so. > > The patch. > > > > Pushed, and backpatched. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
On Mon, Jan 10, 2022 at 4:14 PM Andrew Dunstan <andrew@dunslane.net> wrote:
Pushed, and backpatched.
Great, thanks.
Regards,
Juan José Santamaría Flecha