Re: Radix tree for character conversion
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>,
Heikki Linnakangas <hlinnaka@iki.fi>,
Robert Haas <robertmhaas@gmail.com>,
tsunakawa.takay@jp.fujitsu.com,
Tom Lane <tgl@sss.pgh.pa.us>,
ishii@sraoss.co.jp,
pgsql-hackers@postgresql.org
Date: 2016-11-09T01:19:01Z
Lists: pgsql-hackers
Attachments
- fix_perlcritic.patch (application/octet-stream) patch
> On 08 Nov 2016, at 17:37, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: > > On 10/31/16 12:11 PM, Daniel Gustafsson wrote: >> I took a small stab at doing some cleaning of the Perl scripts, mainly around >> using the more modern (well, modern as in +15 years old) form for open(..), >> avoiding global filehandles for passing scalar references and enforcing use >> strict. Some smaller typos and fixes were also included. It seems my Perl has >> become a bit rusty so I hope the changes make sense. The produced files are >> identical with these patches applied, they are merely doing cleaning as opposed >> to bugfixing. >> >> The attached patches are against the 0001-0006 patches from Heikki and you in >> this series of emails, the separation is intended to make them easier to read. > > Cool. See also here: > https://www.postgresql.org/message-id/55E52225.4040305%40gmx.net Nice, not having hacked much Perl in quite a while I had all but forgotten about perlcritic. Running it on the current version of the patchset yields mostly warnings on string values used in the require “convutils.pm” statement. There were however two more interesting reports: one more open() call not using the three parameter form and an instance of map which alters the input value. The latter is not causing an issue since we don’t use the input list past the map but fixing it seems like good form. Attached is a patch that addresses the perlcritic reports (running without any special options). cheers ./daniel
Commits
-
Use radix tree for character encoding conversions.
- aeed17d00037 10.0 landed
-
Small fixes to the Perl scripts to create unicode conversion tables.
- bc1686f3f653 10.0 landed
-
Rewrite the perl scripts to produce our Unicode conversion tables.
- 1de9cc0dcca6 10.0 landed
-
Remove leading zeros, for consistency with other map files.
- 6c303223be34 10.0 landed
-
Remove code points < 0x80 from character conversion tables.
- 2c09c93ce1b8 10.0 landed