Skip to content

Commit

Permalink
Fix harmless LC_COLLATE[_MASK] confusion.
Browse files Browse the repository at this point in the history
Commit ca051d8 called newlocale(LC_COLLATE, ...) instead of
newlocale(LC_COLLATE_MASK, ...), in code reached only on FreeBSD.  They
have the same value on that OS, explaining why it worked.  Fix.

Back-patch to 14, where ca051d8 landed.

(cherry picked from commit c1bb534bae431f4bbc50abf471507457e1b24efc)
  • Loading branch information
macdice authored and shardgupta committed Dec 6, 2024
1 parent 7b9dd52 commit e481c91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/utils/adt/pg_locale.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,7 +1741,7 @@ get_collation_actual_version(char collprovider, const char *collcollate)
locale_t loc;

/* Look up FreeBSD collation version. */
loc = newlocale(LC_COLLATE, collcollate, NULL);
loc = newlocale(LC_COLLATE_MASK, collcollate, NULL);
if (loc)
{
collversion =
Expand Down

0 comments on commit e481c91

Please sign in to comment.