Re: speed up unicode normalization quick check - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: speed up unicode normalization quick check
Date
Msg-id 20201019065728.GC9612@paquier.xyz
Whole thread Raw
In response to Re: speed up unicode normalization quick check  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On Mon, Oct 19, 2020 at 08:15:56AM +0200, Peter Eisentraut wrote:
> On 2020-10-12 13:36, Michael Paquier wrote:
> > On Mon, Oct 12, 2020 at 03:39:51PM +0900, Masahiko Sawada wrote:
> > > Yes, this patch resolves the problem.
> >
> > Okay, applied then.
>
> Could you adjust the generation script so that the resulting header file
> passes the git whitespace check?  Check the output of
>
> git show --check 80f8eb79e24d9b7963eaf17ce846667e2c6b6e6f

Hmm.  Giving up on the left space padding would make the table harder
to read because the elements would not be aligned anymore across
multiple lines, and I'd rather keep 8 elements per lines as we do now.
This is generated by this part in PerfectHash.pm, where we apply a
at most 7 spaces of padding to all the members, except the first one
of a line that uses 6 spaces at most with two tabs:
    for (my $i = 0; $i < $nhash; $i++)
    {
        $f .= sprintf "%s%6d,%s",
          ($i % 8 == 0 ? "\t\t" : " "),
          $hashtab[$i],
          ($i % 8 == 7 ? "\n" : "");
    }
Could we consider this stuff as a special case in .gitattributes
instead?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: "Hou, Zhijie"
Date:
Subject: Use PointerGetDatum(cstring_to_text_with_len()) instead of CStringGetTextDatum() to avoid duplicate strlen
Next
From: Masahiko Sawada
Date:
Subject: Re: Transactions involving multiple postgres foreign servers, take 2