Re: improvements in Unicode tables generation code

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: improvements in Unicode tables generation code
Date: 2021-06-23 08:55:41
Message-ID: 294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.06.21 10:20, Heikki Linnakangas wrote:
> On 22/06/2021 10:20, Peter Eisentraut wrote:
>> I have accumulated a few patches to improve the output of the scripts in
>> src/backend/utils/mb/Unicode/ to be less non-standard-looking and fix a
>> few other minor things in that area.
>>
>> v1-0001-Make-Unicode-makefile-more-parallel-safe.patch
>>
>> The makefile rule that calls UCS_to_most.pl was written incorrectly for
>> parallel make.  The script writes all output files in one go, but the
>> rule as written would call the command once for each output file in
>> parallel.
>
> This could use a comment. At a quick glance, I don't understand what all
> the $(wordlist ...) magic does.
>
> Perhaps we should change the script or Makefile so that it doesn't
> create all the maps in one go?

I agree, either comment it better or just write one file at a time.
I'll take another look at that.

>> v1-0003-Remove-some-whitespace-in-generated-C-output.patch
>>
>> Improve a small formatting issue in the output.
>
> I'm surprised the added \n in the perl code didn't result in extra
> newlines in the outputs.

True, I'll have to check that again. I suspect that \n actually belongs
to patch 0004.

>> v1-0004-Simplify-code-generation-code.patch
>>
>> This simplifies the code a bit, which helps with the next patch.
>
> If we do that, let's add the trailing commas to the other arrays too,
> not just the combined maps.
>
> No objection, but how does this help the next patch?

Mainly it just moves things around so that each print normally starts at
the beginning of a line and concludes with a \n.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2021-06-23 09:07:24 Deadlock risk while inserting directly into partition?
Previous Message Greg Nancarrow 2021-06-23 08:40:45 Re: Added schema level support for publication.