Skip to content

Commit ceaeac5

Browse files
committed
Fix minor issues with new unicode {de,re}composition code
The table generation script would incorrectly complain in the recomposition sorting when matching code points. This would not have caused the generation of an incorrect table. Note that this condition is not reachable yet, but could have been reached with future updates. pg_bswap.h does not need to be included in the frontend.x Author: John Naylor Discussion: https://postgr.es/m/CAFBsxsGWmExpvv=61vtDKCs7+kBbhkwBDL2Ph9CacziFKnV_yw@mail.gmail.com
1 parent 7577dd8 commit ceaeac5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/common/unicode/generate-unicode_norm_table.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ sub recomp_sort
400400
my $bcode = hex($b->{code});
401401

402402
return -1 if $acode < $bcode;
403-
return -1 if $acode > $bcode;
403+
return 1 if $acode > $bcode;
404404

405405
die "found duplicate entries of recomposeable code pairs";
406406
}

src/common/unicode_norm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#ifndef FRONTEND
2323
#include "common/unicode_norm_hashfunc.h"
2424
#include "common/unicode_normprops_table.h"
25+
#include "port/pg_bswap.h"
2526
#else
2627
#include "common/unicode_norm_table.h"
2728
#endif
28-
#include "port/pg_bswap.h"
2929

3030
#ifndef FRONTEND
3131
#define ALLOC(size) palloc(size)

0 commit comments

Comments
 (0)