Re: Fix vcregress plpython3 warning

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix vcregress plpython3 warning
Date: 2022-01-07 14:24:39
Message-ID: b682d838-a905-01c1-7759-6e9c9a6bd828@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 1/7/22 08:56, Juan José Santamaría Flecha wrote:
>
> On Fri, Jan 7, 2022 at 2:30 PM Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2022-01-07 14:25:28 Re: ICU for global collation
Previous Message Juan José Santamaría Flecha 2022-01-07 13:58:01 Re: Fix vcregress plpython3 warning