From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>, Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com> |
Subject: | Re: Why do we have perl and sed versions of Gen_dummy_probes? |
Date: | 2021-05-10 12:29:40 |
Message-ID: | 5955bc9c-fbee-21f9-6c75-38c767a8bb82@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 5/10/21 7:16 AM, Dagfinn Ilmari Mannsåker wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
>
>> On 07.05.21 20:31, Andrew Dunstan wrote:
>>> On 5/7/21 1:20 PM, Andres Freund wrote:
>>>> On 2021-05-07 11:19:02 -0400, Andrew Dunstan wrote:
>>>>> Here's a patch that adds the README and also adds a Makefile recipe for
>>>>> regenerating Gen_dummy_probes.pl after the sed script is changed. On my
>>>>> system at least the recipe is idempotent.
>>>> Nice! Thanks for this work.
>>> de nada. pushed.
>> This recipe doesn't produce a Gen_dummy_probes.pl that matches exactly
>> the one that is there now. If this is going to be the preferred method,
>> then we should generate it once so that it matches going forward.
> Which version of perltidy do you have installed? For me it generates
> identical versions using any of 20170521 (per src/tools/pgindent/README),
> 20201207 (what I happened to have installed before), and 20210402 (the
> latest).
>
> Also, what does the difference look like?
>
Yep:
andrew(at)emma:utils $ touch Gen_dummy_probes.sed
andrew(at)emma:utils $ touch ../../../src/Makefile.global
andrew(at)emma:utils $ make top_srcdir=../../.. Gen_dummy_probes.pl
perl -ni -e ' print; exit if /^\$0/;' Gen_dummy_probes.pl
s2p -f Gen_dummy_probes.sed | sed -e 1,4d -e '/# #/d' -e '$d' >>
Gen_dummy_probes.pl
perltidy --profile=../../tools/pgindent/perltidyrc Gen_dummy_probes.pl
perl -pi -e '!$lb && ( /^\t+#/ || /^# prototypes/ ) && print qq{\n};'\
-e '$lb = m/^\n/; ' Gen_dummy_probes.pl
andrew(at)emma:utils $ git diff
andrew(at)emma:utils $ perltidy --version
This is perltidy, v20170521
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-05-10 12:32:56 | postgres_fdw - make cached connection functions tests meaningful |
Previous Message | tanghy.fnst@fujitsu.com | 2021-05-10 12:26:55 | RE: Remove "FROM" in "DELETE FROM" when using tab-completion |