A bug in UCS_to_most.pl - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject A bug in UCS_to_most.pl
Date
Msg-id 20161108.175610.244307491.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
Responses Re: A bug in UCS_to_most.pl
List pgsql-hackers
Hello,

I was surprised to find that
src/backend/utils/mb/Unicode/Makefile got changed (3a47c70) to
have download feature of character conversion authority files. It
seems fine according to the previous discussion as the commnet of
that is saying.

So, I did 'make maintainer-clean; make' on it but got the
following error.

> Hash %filename missing the % in argument 1 of keys() at UCS_to_most.pl line 51.'/usr/bin/perl' UCS_to_most.pl

What is more surprising to find that it is there since
2006. Maybe Heikki unintentionally fixed that in the patch in the
thread, or older perls might not have complained about it (my
perl is 5.16).

Anyway, the attached small patch fixes it.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center
diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl b/src/backend/utils/mb/Unicode/UCS_to_most.pl
index d7ec8ef..125378f 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_most.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl
@@ -48,7 +48,7 @@ require "ucs2utf.pl";    'UHC'        => 'CP949.TXT',    'JOHAB'      => 'JOHAB.TXT',);
-@charsets = keys(filename);
+@charsets = keys(%filename);@charsets = @ARGV if scalar(@ARGV);foreach $charset (@charsets){

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Fwd: Re: [CORE] temporal tables (SQL2011)
Next
From: Fabien COELHO
Date:
Subject: Re: Specifying the log file name of pgbench -l option