pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: improvements in Unicode tables generation code
Date: Wed, 23 Jun 2021 10:55:41 +0200
Message-ID: <294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com> (raw)
In-Reply-To: <f77d3a96-f2bf-662a-4a98-7ed7a9dc45fa@iki.fi>
References: <22016aa9-ca59-15c7-01df-f292cb558c4d@enterprisedb.com>
	<f77d3a96-f2bf-662a-4a98-7ed7a9dc45fa@iki.fi>

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.





view thread (8+ messages)  latest in thread

Message-ID: <294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com>
Permalink:  ../294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com/
Also on:    postgresql.org/message-id/294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, hlinnaka@iki.fi
  Subject: Re: improvements in Unicode tables generation code
  In-Reply-To: <294cd3ee-7988-9ce2-87e2-5acaac8db01c@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox