Re: improvements in Unicode tables generation code - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: improvements in Unicode tables generation code
Date
Msg-id 294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com
Whole thread Raw
In response to Re: improvements in Unicode tables generation code  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: improvements in Unicode tables generation code
List 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.



pgsql-hackers by date:

Previous
From: Greg Nancarrow
Date:
Subject: Re: Added schema level support for publication.
Next
From: Amit Kapila
Date:
Subject: Deadlock risk while inserting directly into partition?